Module: PomodoroTimer
- Extended by:
- PomodoroTimer
- Included in:
- PomodoroTimer
- Defined in:
- lib/pomodoro_timer.rb,
lib/pomodoro_timer/cycle.rb,
lib/pomodoro_timer/version.rb,
lib/pomodoro_timer/pomodoro.rb,
lib/pomodoro_timer/running_thread.rb
Defined Under Namespace
Classes: Cycle, Pomodoro, RunningThread
Constant Summary
collapse
- TIME_FORMAT =
"%H:%M"
- VERSION =
"0.0.4"
Instance Method Summary
collapse
Instance Method Details
#cancel ⇒ Object
23
24
25
|
# File 'lib/pomodoro_timer.rb', line 23
def cancel
@@pomodoro.cancel
end
|
#start(what = nil) ⇒ Object
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/pomodoro_timer.rb', line 12
def start(what=nil)
@@pomodoro ||= nil
if @@pomodoro.nil? || @@pomodoro.finished?
@@pomodoro = Pomodoro.new(what!=Cycle::BREAK_NAME)
else
puts "Exist another pomodoro running!"
end
return nil
end
|
#status ⇒ Object
27
28
29
|
# File 'lib/pomodoro_timer.rb', line 27
def status
@@pomodoro.show_status
end
|