Class: Codebot::Options::Core

Inherits:
Thor
  • Object
show all
Defined in:
lib/codebot/options/core.rb

Overview

A class that handles the codebot core command.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Ensures that thor uses the correct exit code.

Returns:

  • (Boolean)

    true



44
45
46
# File 'lib/codebot/options/core.rb', line 44

def self.exit_on_failure?
  true
end

Instance Method Details

#interactiveObject

Runs Codebot interactively.



14
15
16
# File 'lib/codebot/options/core.rb', line 14

def interactive
  run_core(true)
end

#rehashObject

Reloads the configuration of a running Codebot instance.



37
38
39
# File 'lib/codebot/options/core.rb', line 37

def rehash
  Options.with_ipc_client(options, &:send_rehash)
end

#startObject

Starts a new Codebot instance in the background.



21
22
23
24
25
# File 'lib/codebot/options/core.rb', line 21

def start
  Options.with_errors { check_fork_supported! }
  check_not_running!(options)
  fork { run_core(false) }
end

#stopObject

Stops a running Codebot instance.



30
31
32
# File 'lib/codebot/options/core.rb', line 30

def stop
  Options.with_ipc_client(options, &:send_stop)
end