Class: Droonga::Command::DroongaEngine

Inherits:
Object
  • Object
show all
Defined in:
lib/droonga/command/droonga_engine.rb

Defined Under Namespace

Classes: CommandRunner, Configuration, EngineRunner, MainLoop, ServiceRunner

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDroongaEngine

Returns a new instance of DroongaEngine.



46
47
48
49
# File 'lib/droonga/command/droonga_engine.rb', line 46

def initialize
  @configuration = Configuration.new
  @log_output = nil
end

Class Method Details

.run(command_line_arguments) ⇒ Object



41
42
43
# File 'lib/droonga/command/droonga_engine.rb', line 41

def run(command_line_arguments)
  new.run(command_line_arguments)
end

Instance Method Details

#run(command_line_arguments) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/droonga/command/droonga_engine.rb', line 51

def run(command_line_arguments)
  parse_command_line_arguments!(command_line_arguments)

  setup_path
  setup_log

  if @configuration.daemon?
    Process.daemon
  end

  run_main_loop
end