Class: Fudge::Tasks::EachDirectory
- Inherits:
-
CompositeTask
- Object
- Task
- CompositeTask
- Fudge::Tasks::EachDirectory
- Defined in:
- lib/fudge/tasks/each_directory.rb
Overview
A task which runs a number of other tasks in a given directory (relative to the current directory)
Instance Attribute Summary collapse
-
#exclude ⇒ Object
Returns the value of attribute exclude.
Attributes inherited from CompositeTask
Attributes inherited from Task
Instance Method Summary collapse
-
#initialize(pattern, *args) ⇒ EachDirectory
constructor
A new instance of EachDirectory.
-
#run(options = {}) ⇒ Object
Run task.
Methods inherited from CompositeTask
Methods inherited from Task
Constructor Details
#initialize(pattern, *args) ⇒ EachDirectory
Returns a new instance of EachDirectory.
8 9 10 11 12 |
# File 'lib/fudge/tasks/each_directory.rb', line 8 def initialize(pattern, *args) super(*args) @pattern = pattern end |
Instance Attribute Details
#exclude ⇒ Object
Returns the value of attribute exclude.
6 7 8 |
# File 'lib/fudge/tasks/each_directory.rb', line 6 def exclude @exclude end |
Instance Method Details
#run(options = {}) ⇒ Object
Run task
15 16 17 18 19 20 21 22 23 |
# File 'lib/fudge/tasks/each_directory.rb', line 15 def run(={}) formatter = get_formatter() directories.all? do |dir| skip_directory?(dir) || WithDirectory.new(dir, formatter).inside do super end end end |