Class: TomatoPaste::Pomodoro
- Inherits:
-
Object
- Object
- TomatoPaste::Pomodoro
- Defined in:
- lib/tomato_paste/pomodoro.rb
Instance Attribute Summary collapse
-
#break_timer ⇒ Object
readonly
Returns the value of attribute break_timer.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#work_timer ⇒ Object
readonly
Returns the value of attribute work_timer.
Instance Method Summary collapse
-
#initialize(description) ⇒ Pomodoro
constructor
A new instance of Pomodoro.
Constructor Details
#initialize(description) ⇒ Pomodoro
Returns a new instance of Pomodoro.
5 6 7 8 9 10 |
# File 'lib/tomato_paste/pomodoro.rb', line 5 def initialize(description) @description = description @work_timer = Timer.new(1500) # 25 minutes @break_timer = Timer.new(300) # 5 minutes @state = :unstarted end |
Instance Attribute Details
#break_timer ⇒ Object (readonly)
Returns the value of attribute break_timer.
3 4 5 |
# File 'lib/tomato_paste/pomodoro.rb', line 3 def break_timer @break_timer end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/tomato_paste/pomodoro.rb', line 3 def description @description end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/tomato_paste/pomodoro.rb', line 3 def state @state end |
#work_timer ⇒ Object (readonly)
Returns the value of attribute work_timer.
3 4 5 |
# File 'lib/tomato_paste/pomodoro.rb', line 3 def work_timer @work_timer end |