Class: FCReminder::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/fc-reminder/runner.rb

Constant Summary collapse

PROCESS_NAME =
'FCReminder'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Runner

Returns a new instance of Runner.



9
10
11
12
# File 'lib/fc-reminder/runner.rb', line 9

def initialize(options)
  @options = options
  @reminder = initialize_reminder
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/fc-reminder/runner.rb', line 7

def options
  @options
end

#reminderObject (readonly)

Returns the value of attribute reminder.



7
8
9
# File 'lib/fc-reminder/runner.rb', line 7

def reminder
  @reminder
end

Instance Method Details

#startObject



14
15
16
17
# File 'lib/fc-reminder/runner.rb', line 14

def start
  set_reminder(@reminder, @options)
  @options[:daemon] ? daemonize(@options) : run
end