Class: PomodoroTimer::RunningThread
- Inherits:
-
Object
- Object
- PomodoroTimer::RunningThread
- Defined in:
- lib/pomodoro_timer/running_thread.rb
Instance Attribute Summary collapse
-
#cycle ⇒ Object
readonly
Returns the value of attribute cycle.
Instance Method Summary collapse
-
#initialize(will_work = false) ⇒ RunningThread
constructor
A new instance of RunningThread.
- #kill ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(will_work = false) ⇒ RunningThread
Returns a new instance of RunningThread.
5 6 7 8 9 10 11 12 |
# File 'lib/pomodoro_timer/running_thread.rb', line 5 def initialize(will_work=false) @will_work = will_work @cycle = Cycle::STOPPED @thread = Thread.new do run end end |
Instance Attribute Details
#cycle ⇒ Object (readonly)
Returns the value of attribute cycle.
3 4 5 |
# File 'lib/pomodoro_timer/running_thread.rb', line 3 def cycle @cycle end |