Class: Remme::Runner

Inherits:
Object
  • Object
show all
Includes:
Demonizer
Defined in:
lib/remme.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Demonizer

#demonize

Constructor Details

#initialize(options) ⇒ Runner

Returns a new instance of Runner.



20
21
22
23
24
25
26
# File 'lib/remme.rb', line 20

def initialize(options)
  @options = options.merge(
    notifier: notifier,
    after_hook: ->() { player.play },
    before_hook: ->() { player.pause }
  )
end

Class Method Details

.run(options) ⇒ Object



15
16
17
# File 'lib/remme.rb', line 15

def run(options)
  new(options).run
end

Instance Method Details

#runObject



28
29
30
31
32
33
# File 'lib/remme.rb', line 28

def run
  demonize(Process) do
    Scheduler.run(@options)
    until Scheduler.completed? do end
  end
end