Class: Ruby::Pomodoro::Cmd::ChooseTask
- Defined in:
- lib/ruby/pomodoro/cmd/choose_task.rb
Overview
Select task and start worker
Instance Method Summary collapse
Methods inherited from Base
Methods included from TimeHelpers
Constructor Details
This class inherits a constructor from Ruby::Pomodoro::Cmd::Base
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby/pomodoro/cmd/choose_task.rb', line 7 def call worker.pause if worker.working? print task = Ruby::Pomodoro::Tasks::Resource.find(select_task(worker.current_task)) Main.new.call if task worker.stop worker.start(task) else worker.resume if worker.paused? end :ok end |