Class: Teapot::Dependency::Chain
- Inherits:
-
Object
- Object
- Teapot::Dependency::Chain
- Defined in:
- lib/teapot/dependency.rb
Instance Attribute Summary collapse
-
#conflicts ⇒ Object
readonly
Returns the value of attribute conflicts.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#ordered ⇒ Object
readonly
Returns the value of attribute ordered.
-
#providers ⇒ Object
readonly
Returns the value of attribute providers.
-
#provisions ⇒ Object
readonly
Returns the value of attribute provisions.
-
#resolved ⇒ Object
readonly
Returns the value of attribute resolved.
-
#selection ⇒ Object
readonly
Returns the value of attribute selection.
-
#unresolved ⇒ Object
readonly
Returns the value of attribute unresolved.
Instance Method Summary collapse
-
#initialize(selection, dependencies, providers) ⇒ Chain
constructor
A new instance of Chain.
Constructor Details
#initialize(selection, dependencies, providers) ⇒ Chain
Returns a new instance of Chain.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/teapot/dependency.rb', line 79 def initialize(selection, dependencies, providers) # Explicitly selected targets which will be used when resolving ambiguity: @selection = Set.new(selection) # The list of dependencies that needs to be satisfied: @dependencies = dependencies # The available providers which match up to required dependencies: @providers = providers @resolved = Set.new @ordered = [] @provisions = [] @unresolved = [] @conflicts = {} @dependencies.each do |dependency| (dependency, "<top>") end end |
Instance Attribute Details
#conflicts ⇒ Object (readonly)
Returns the value of attribute conflicts.
108 109 110 |
# File 'lib/teapot/dependency.rb', line 108 def conflicts @conflicts end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
101 102 103 |
# File 'lib/teapot/dependency.rb', line 101 def dependencies @dependencies end |
#ordered ⇒ Object (readonly)
Returns the value of attribute ordered.
105 106 107 |
# File 'lib/teapot/dependency.rb', line 105 def ordered @ordered end |
#providers ⇒ Object (readonly)
Returns the value of attribute providers.
102 103 104 |
# File 'lib/teapot/dependency.rb', line 102 def providers @providers end |
#provisions ⇒ Object (readonly)
Returns the value of attribute provisions.
106 107 108 |
# File 'lib/teapot/dependency.rb', line 106 def provisions @provisions end |
#resolved ⇒ Object (readonly)
Returns the value of attribute resolved.
104 105 106 |
# File 'lib/teapot/dependency.rb', line 104 def resolved @resolved end |
#selection ⇒ Object (readonly)
Returns the value of attribute selection.
100 101 102 |
# File 'lib/teapot/dependency.rb', line 100 def selection @selection end |
#unresolved ⇒ Object (readonly)
Returns the value of attribute unresolved.
107 108 109 |
# File 'lib/teapot/dependency.rb', line 107 def unresolved @unresolved end |