Class: Rodbot::CLI::Commands::Start

Inherits:
Rodbot::CLI::Command show all
Defined in:
lib/rodbot/cli/commands/start.rb

Instance Method Summary collapse

Methods inherited from Rodbot::CLI::Command

#call

Instance Method Details

#rescued_call(service: nil, extension: nil, daemonize: false, debugger: false) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/rodbot/cli/commands/start.rb', line 13

def rescued_call(service: nil, extension: nil, daemonize: false, debugger: false, **)
  require 'debug' if debugger
  daemonize = true unless service
  Rodbot::Services.new.then do |services|
    (service ? [service] : Rodbot::SERVICES).each do |service|
      services.register(service, extension: extension)
    end
    services.run(daemonize: daemonize)
  end
end