Class: Orchestra::Step
- Inherits:
-
Object
- Object
- Orchestra::Step
- Defined in:
- lib/orchestra/step.rb,
lib/orchestra/step/output.rb
Direct Known Subclasses
Defined Under Namespace
Classes: InlineStep, ObjectStep, 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
- #execute(input = {}) ⇒ Object
-
#initialize(args = {}) ⇒ Step
constructor
A new instance of Step.
- #optional_dependencies ⇒ Object
- #process(raw_output) ⇒ Object
- #required_dependencies ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Step
Returns a new instance of Step.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/orchestra/step.rb', line 5 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.
3 4 5 |
# File 'lib/orchestra/step.rb', line 3 def collection @collection end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
3 4 5 |
# File 'lib/orchestra/step.rb', line 3 def dependencies @dependencies end |
#provisions ⇒ Object (readonly)
Returns the value of attribute provisions.
3 4 5 |
# File 'lib/orchestra/step.rb', line 3 def provisions @provisions end |
Instance Method Details
#collection? ⇒ Boolean
24 25 26 |
# File 'lib/orchestra/step.rb', line 24 def collection? collection ? true : false end |
#execute(input = {}) ⇒ Object
28 29 30 |
# File 'lib/orchestra/step.rb', line 28 def execute input = {} Execution.execute_step self, input end |
#optional_dependencies ⇒ Object
20 21 22 |
# File 'lib/orchestra/step.rb', line 20 def optional_dependencies defaults.keys end |
#process(raw_output) ⇒ Object
32 33 34 |
# File 'lib/orchestra/step.rb', line 32 def process raw_output Output.process self, raw_output end |
#required_dependencies ⇒ Object
16 17 18 |
# File 'lib/orchestra/step.rb', line 16 def required_dependencies dependencies - optional_dependencies end |