Class: TomatoPaste::Pomodoro

Inherits:
Object
  • Object
show all
Defined in:
lib/tomato_paste/pomodoro.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_timerObject (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

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/tomato_paste/pomodoro.rb', line 3

def description
  @description
end

#stateObject (readonly)

Returns the value of attribute state.



3
4
5
# File 'lib/tomato_paste/pomodoro.rb', line 3

def state
  @state
end

#work_timerObject (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