Class: Ruby::Pomodoro::Cmd::Base

Inherits:
Object
  • Object
show all
Includes:
TimeHelpers
Defined in:
lib/ruby/pomodoro/cmd/base.rb

Direct Known Subclasses

ChooseTask, EditList, ErrorHandler, Main, Pause, Quit, Stop

Instance Method Summary collapse

Methods included from TimeHelpers

#to_format_string

Constructor Details

#initialize(printer: Ruby::Pomodoro::Printer.new, prompt: TTY::Prompt.new, worker: Ruby::Pomodoro::Worker.instance) ⇒ Base

Returns a new instance of Base.

Parameters:

  • printer (Ruby::Pomodoro::Printer) (defaults to: Ruby::Pomodoro::Printer.new)
  • prompt (Object) (defaults to: TTY::Prompt.new)


10
11
12
13
14
# File 'lib/ruby/pomodoro/cmd/base.rb', line 10

def initialize(printer: Ruby::Pomodoro::Printer.new, prompt: TTY::Prompt.new, worker: Ruby::Pomodoro::Worker.instance)
  @printer = printer
  @prompt  = prompt
  @worker  = worker
end

Instance Method Details

#callSymbol, NilClass

This method is abstract.

Returns:

  • (Symbol, NilClass)


18
# File 'lib/ruby/pomodoro/cmd/base.rb', line 18

def call; end