Class: Prb::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/prb/server.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Server

Returns a new instance of Server.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/prb/server.rb', line 6

def initialize(opts)
  puts <<~MSG
  Starting pomodoro service...

  Number of pomodoros: #{opts.pomodoros} pomodoro(s)
  Pomodoro timer:      #{opts.timer} minute(s)

  MSG

  @controller = TimerControl.new(opts)
  @controller.start

  super
end