Class: Leftovers::Runner
- Inherits:
-
Object
- Object
- Leftovers::Runner
- Defined in:
- lib/leftovers/runner.rb
Instance Attribute Summary collapse
-
#reporter ⇒ Object
writeonly
Sets the attribute reporter.
Instance Method Summary collapse
Instance Attribute Details
#reporter=(value) ⇒ Object
Sets the attribute reporter
5 6 7 |
# File 'lib/leftovers/runner.rb', line 5 def reporter=(value) @reporter = value end |
Instance Method Details
#collection ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/leftovers/runner.rb', line 22 def collection @collection ||= begin collector.collect collector.collection end end |
#parallel=(value) ⇒ Object
14 15 16 |
# File 'lib/leftovers/runner.rb', line 14 def parallel=(value) collector.parallel = value end |
#progress=(value) ⇒ Object
18 19 20 |
# File 'lib/leftovers/runner.rb', line 18 def progress=(value) collector.progress = value end |
#run ⇒ Object
7 8 9 10 11 12 |
# File 'lib/leftovers/runner.rb', line 7 def run reporter.prepare return reporter.report_success if collection.empty? reporter.report(collection) end |