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, options = {}) ⇒ Chain
constructor
A new instance of Chain.
Constructor Details
#initialize(selection, dependencies, providers, options = {}) ⇒ Chain
Returns a new instance of Chain.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/teapot/dependency.rb', line 82 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.
113 114 115 |
# File 'lib/teapot/dependency.rb', line 113 def conflicts @conflicts end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
106 107 108 |
# File 'lib/teapot/dependency.rb', line 106 def dependencies @dependencies end |
#ordered ⇒ Object (readonly)
Returns the value of attribute ordered.
110 111 112 |
# File 'lib/teapot/dependency.rb', line 110 def ordered @ordered end |
#providers ⇒ Object (readonly)
Returns the value of attribute providers.
107 108 109 |
# File 'lib/teapot/dependency.rb', line 107 def providers @providers end |
#provisions ⇒ Object (readonly)
Returns the value of attribute provisions.
111 112 113 |
# File 'lib/teapot/dependency.rb', line 111 def provisions @provisions end |
#resolved ⇒ Object (readonly)
Returns the value of attribute resolved.
109 110 111 |
# File 'lib/teapot/dependency.rb', line 109 def resolved @resolved end |
#selection ⇒ Object (readonly)
Returns the value of attribute selection.
105 106 107 |
# File 'lib/teapot/dependency.rb', line 105 def selection @selection end |
#unresolved ⇒ Object (readonly)
Returns the value of attribute unresolved.
112 113 114 |
# File 'lib/teapot/dependency.rb', line 112 def unresolved @unresolved end |