Class: Orchestra::Node
- Inherits:
-
Object
- Object
- Orchestra::Node
- Defined in:
- lib/orchestra/node.rb,
lib/orchestra/node/output.rb
Direct Known Subclasses
Defined Under Namespace
Classes: DelegateNode, InlineNode, Output
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#provisions ⇒ Object
readonly
Returns the value of attribute provisions.
Instance Method Summary collapse
- #collection? ⇒ Boolean
-
#initialize(args = {}) ⇒ Node
constructor
A new instance of Node.
- #optional_dependencies ⇒ Object
- #perform(input = {}) ⇒ Object
- #process(raw_output) ⇒ Object
- #required_dependencies ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Node
Returns a new instance of Node.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/orchestra/node.rb', line 7 def initialize args = {} @provisions, @collection, @dependencies = Util.extract_key_args( args, :provides => [], :collection => nil, :dependencies => [], ) end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
5 6 7 |
# File 'lib/orchestra/node.rb', line 5 def collection @collection end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
5 6 7 |
# File 'lib/orchestra/node.rb', line 5 def dependencies @dependencies end |
#provisions ⇒ Object (readonly)
Returns the value of attribute provisions.
5 6 7 |
# File 'lib/orchestra/node.rb', line 5 def provisions @provisions end |
Instance Method Details
#collection? ⇒ Boolean
26 27 28 |
# File 'lib/orchestra/node.rb', line 26 def collection? collection ? true : false end |
#optional_dependencies ⇒ Object
22 23 24 |
# File 'lib/orchestra/node.rb', line 22 def optional_dependencies defaults.keys end |
#perform(input = {}) ⇒ Object
30 31 32 33 |
# File 'lib/orchestra/node.rb', line 30 def perform input = {} performance = Performance.new Conductor.new, {}, input Performance::Movement.perform self, performance end |
#process(raw_output) ⇒ Object
35 36 37 |
# File 'lib/orchestra/node.rb', line 35 def process raw_output Output.process self, raw_output end |
#required_dependencies ⇒ Object
18 19 20 |
# File 'lib/orchestra/node.rb', line 18 def required_dependencies dependencies - optional_dependencies end |