Class: OutputCollection
- Inherits:
-
Object
- Object
- OutputCollection
- Defined in:
- lib/outputs/output_collection.rb
Instance Method Summary collapse
- #add(output) ⇒ Object
- #add_result(result) ⇒ Object
-
#initialize ⇒ OutputCollection
constructor
A new instance of OutputCollection.
- #start_run ⇒ Object
Constructor Details
#initialize ⇒ OutputCollection
Returns a new instance of OutputCollection.
3 4 5 |
# File 'lib/outputs/output_collection.rb', line 3 def initialize @outputs = [] end |
Instance Method Details
#add(output) ⇒ Object
13 14 15 |
# File 'lib/outputs/output_collection.rb', line 13 def add(output) @outputs << output end |
#add_result(result) ⇒ Object
17 18 19 20 21 |
# File 'lib/outputs/output_collection.rb', line 17 def add_result(result) @outputs.each do |output| output.add_result(result) end end |
#start_run ⇒ Object
7 8 9 10 11 |
# File 'lib/outputs/output_collection.rb', line 7 def start_run @outputs.each do |output| output.start_run end end |