Class: ProgressMonitor::Display::TimerLoop
- Inherits:
-
Object
- Object
- ProgressMonitor::Display::TimerLoop
- Defined in:
- lib/progress_monitor/display/timer_loop.rb
Instance Attribute Summary collapse
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Instance Method Summary collapse
-
#initialize(queue) ⇒ TimerLoop
constructor
A new instance of TimerLoop.
- #perform ⇒ Object
Constructor Details
#initialize(queue) ⇒ TimerLoop
6 7 8 |
# File 'lib/progress_monitor/display/timer_loop.rb', line 6 def initialize(queue) @queue = queue end |
Instance Attribute Details
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
4 5 6 |
# File 'lib/progress_monitor/display/timer_loop.rb', line 4 def queue @queue end |
Instance Method Details
#perform ⇒ Object
10 11 12 13 14 15 |
# File 'lib/progress_monitor/display/timer_loop.rb', line 10 def perform loop do sleep 0.1 queue << {type: :timer} end end |