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.



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

def initialize
  self.options = DEFAULT_OPTIONS.dup
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



17
18
19
# File 'lib/eventboss/cli.rb', line 17

def options
  @options
end

Instance Method Details

#parse(args = ARGV) ⇒ Object



27
28
29
30
# File 'lib/eventboss/cli.rb', line 27

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

#runObject



32
33
34
35
36
37
38
# File 'lib/eventboss/cli.rb', line 32

def run
  boot_system

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

  Eventboss.launch
end