class Bundler::Resolver::Base

Public Class Methods

new(base, additional_base_requirements) click to toggle source
# File bundler/resolver/base.rb, line 6
def initialize(base, additional_base_requirements)
  @base = base
  @additional_base_requirements = additional_base_requirements
end

Public Instance Methods

[](name) click to toggle source
# File bundler/resolver/base.rb, line 11
def [](name)
  @base[name]
end
base_requirements() click to toggle source
# File bundler/resolver/base.rb, line 19
def base_requirements
  @base_requirements ||= build_base_requirements
end
delete(spec) click to toggle source
# File bundler/resolver/base.rb, line 15
def delete(spec)
  @base.delete(spec)
end
unlock_names(names) click to toggle source
# File bundler/resolver/base.rb, line 23
def unlock_names(names)
  names.each do |name|
    @base.delete_by_name(name)

    @additional_base_requirements.reject! {|dep| dep.name == name }
  end

  @base_requirements = nil
end

Private Instance Methods

build_base_requirements() click to toggle source
# File bundler/resolver/base.rb, line 35
def build_base_requirements
  base_requirements = {}
  @base.each do |ls|
    req = Gem::Requirement.new(ls.version)
    base_requirements[ls.name] = req
  end
  @additional_base_requirements.each {|d| base_requirements[d.name] = d.requirement }
  base_requirements
end