Class: Scheduler
- Inherits:
-
Object
- Object
- Scheduler
- Defined in:
- lib/flote/scheduler.rb
Instance Attribute Summary collapse
-
#interrupt_listener ⇒ Object
Returns the value of attribute interrupt_listener.
Instance Method Summary collapse
-
#initialize(runner) ⇒ Scheduler
constructor
A new instance of Scheduler.
- #start ⇒ Object
Constructor Details
#initialize(runner) ⇒ Scheduler
Returns a new instance of Scheduler.
5 6 7 |
# File 'lib/flote/scheduler.rb', line 5 def initialize runner @runner = runner end |
Instance Attribute Details
#interrupt_listener ⇒ Object
Returns the value of attribute interrupt_listener.
3 4 5 |
# File 'lib/flote/scheduler.rb', line 3 def interrupt_listener @interrupt_listener end |
Instance Method Details
#start ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/flote/scheduler.rb', line 9 def start @continue = true register_interrupt_listener @runner.start while @continue do sleep 1 @runner.execute end end |