Class: Eventboss::CLI

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/eventboss/cli.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{
  require: '.'
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



19
20
21
# File 'lib/eventboss/cli.rb', line 19

def initialize
  self.options = DEFAULT_OPTIONS.dup
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



13
14
15
# File 'lib/eventboss/cli.rb', line 13

def options
  @options
end

Instance Method Details

#parse(args = ARGV) ⇒ Object



23
24
25
26
# File 'lib/eventboss/cli.rb', line 23

def parse(args = ARGV)
  parse_options(args)
  load_config_file
end

#runObject



28
29
30
31
32
33
34
# File 'lib/eventboss/cli.rb', line 28

def run
  boot_system

  Eventboss.logger.info('Starting eventboss...')

  Eventboss.launch
end