Class: KeepUp::DependencySet
- Inherits:
-
Object
- Object
- KeepUp::DependencySet
- Defined in:
- lib/keep_up/dependency_set.rb
Overview
Set of dependencies with their current locked versions.
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
Instance Method Summary collapse
- #find_specification_update(update) ⇒ Object
-
#initialize(dependencies) ⇒ DependencySet
constructor
A new instance of DependencySet.
Constructor Details
#initialize(dependencies) ⇒ DependencySet
Returns a new instance of DependencySet.
8 9 10 |
# File 'lib/keep_up/dependency_set.rb', line 8 def initialize(dependencies) @dependencies = dependencies end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
6 7 8 |
# File 'lib/keep_up/dependency_set.rb', line 6 def dependencies @dependencies end |
Instance Method Details
#find_specification_update(update) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/keep_up/dependency_set.rb', line 12 def find_specification_update(update) current_dependency = dependencies.find { |it| it.name == update.name } return if !current_dependency || current_dependency.matches_spec?(update) current_dependency.generalize_specification(update) end |