Class: Bundler::Resolver::Base
- Inherits:
-
Object
- Object
- Bundler::Resolver::Base
- Defined in:
- lib/bundler/resolver/base.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
- #base_requirements ⇒ Object
- #delete(spec) ⇒ Object
-
#initialize(base, additional_base_requirements) ⇒ Base
constructor
A new instance of Base.
- #unlock_deps(deps) ⇒ Object
Constructor Details
#initialize(base, additional_base_requirements) ⇒ Base
Returns a new instance of Base.
6 7 8 9 |
# File 'lib/bundler/resolver/base.rb', line 6 def initialize(base, additional_base_requirements) @base = base @additional_base_requirements = additional_base_requirements end |
Instance Method Details
#[](name) ⇒ Object
11 12 13 |
# File 'lib/bundler/resolver/base.rb', line 11 def [](name) @base[name] end |
#base_requirements ⇒ Object
19 20 21 |
# File 'lib/bundler/resolver/base.rb', line 19 def base_requirements @base_requirements ||= build_base_requirements end |
#delete(spec) ⇒ Object
15 16 17 |
# File 'lib/bundler/resolver/base.rb', line 15 def delete(spec) @base.delete(spec) end |
#unlock_deps(deps) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/bundler/resolver/base.rb', line 23 def unlock_deps(deps) exact, lower_bound = deps.partition(&:specific?) exact.each do |exact_dep| @base.delete_by_name_and_version(exact_dep.name, exact_dep.requirement.requirements.first.last) end lower_bound.each do |lower_bound_dep| @additional_base_requirements.delete(lower_bound_dep) end @base_requirements = nil end |