Class: Cleaner::Runner
- Inherits:
-
Object
- Object
- Cleaner::Runner
- Defined in:
- lib/cleaner/runner.rb
Instance Attribute Summary collapse
-
#directories ⇒ Object
readonly
Returns the value of attribute directories.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
-
#initialize(rules) ⇒ Runner
constructor
A new instance of Runner.
- #start ⇒ Object
Constructor Details
#initialize(rules) ⇒ Runner
Returns a new instance of Runner.
5 6 7 8 |
# File 'lib/cleaner/runner.rb', line 5 def initialize(rules) @rules = rules @directories = [] end |
Instance Attribute Details
#directories ⇒ Object (readonly)
Returns the value of attribute directories.
3 4 5 |
# File 'lib/cleaner/runner.rb', line 3 def directories @directories end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
3 4 5 |
# File 'lib/cleaner/runner.rb', line 3 def rules @rules end |
Instance Method Details
#start ⇒ Object
10 11 12 13 |
# File 'lib/cleaner/runner.rb', line 10 def start instance_eval(rules) directories.each(&:clean) end |