Class: Orchestra::RunList
- Inherits:
-
Object
- Object
- Orchestra::RunList
- Includes:
- Enumerable
- Defined in:
- lib/orchestra/run_list.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Class Method Summary collapse
Instance Method Summary collapse
- #dependencies ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(steps, result) ⇒ RunList
constructor
A new instance of RunList.
- #optional_dependencies ⇒ Object
- #provisions ⇒ Object
- #required_dependencies ⇒ Object
- #step_names ⇒ Object
Constructor Details
#initialize(steps, result) ⇒ RunList
Returns a new instance of RunList.
13 14 15 16 17 18 |
# File 'lib/orchestra/run_list.rb', line 13 def initialize steps, result @result = result @steps = steps @steps.freeze freeze end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
9 10 11 |
# File 'lib/orchestra/run_list.rb', line 9 def result @result end |
Class Method Details
Instance Method Details
#dependencies ⇒ Object
29 30 31 32 33 |
# File 'lib/orchestra/run_list.rb', line 29 def dependencies optional = collect_from_steps :optional_dependencies required = collect_from_steps :required_dependencies (optional + required).uniq end |
#each(&block) ⇒ Object
20 21 22 23 |
# File 'lib/orchestra/run_list.rb', line 20 def each &block return to_enum :each unless block_given? @steps.each &block end |
#optional_dependencies ⇒ Object
35 36 37 |
# File 'lib/orchestra/run_list.rb', line 35 def optional_dependencies collect_from_steps :optional_dependencies end |
#provisions ⇒ Object
39 40 41 |
# File 'lib/orchestra/run_list.rb', line 39 def provisions collect_from_steps :provisions end |
#required_dependencies ⇒ Object
43 44 45 46 |
# File 'lib/orchestra/run_list.rb', line 43 def required_dependencies required_deps = collect_from_steps :required_dependencies required_deps - optional_dependencies - provisions end |
#step_names ⇒ Object
25 26 27 |
# File 'lib/orchestra/run_list.rb', line 25 def step_names @steps.keys end |