Class: Fudge::Tasks::CompositeTask
- Defined in:
- lib/fudge/tasks/composite_task.rb
Overview
Allow for tasks to be combined
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
Attributes inherited from Task
Instance Method Summary collapse
-
#run(options = {}) ⇒ Object
Runs the task (by default running all other tasks in order).
-
#tasks ⇒ Object
Define task array.
Methods inherited from Task
Constructor Details
This class inherits a constructor from Fudge::Tasks::Task
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/fudge/tasks/composite_task.rb', line 7 def description @description end |
Instance Method Details
#run(options = {}) ⇒ Object
Runs the task (by default running all other tasks in order)
15 16 17 18 19 20 21 22 |
# File 'lib/fudge/tasks/composite_task.rb', line 15 def run(={}) formatter = get_formatter() tasks.each do |t| apply_directory_settings(t) (t, formatter) return unless t.run() end end |
#tasks ⇒ Object
Define task array
10 11 12 |
# File 'lib/fudge/tasks/composite_task.rb', line 10 def tasks @tasks ||= [] end |