Class: Codebot::Options::Core
- Inherits:
-
Thor
- Object
- Thor
- Codebot::Options::Core
- Defined in:
- lib/codebot/options/core.rb
Overview
A class that handles the codebot core command.
Class Method Summary collapse
-
.exit_on_failure? ⇒ Boolean
Ensures that thor uses the correct exit code.
Instance Method Summary collapse
-
#interactive ⇒ Object
Runs Codebot interactively.
-
#rehash ⇒ Object
Reloads the configuration of a running Codebot instance.
-
#start ⇒ Object
Starts a new Codebot instance in the background.
-
#stop ⇒ Object
Stops a running Codebot instance.
Class Method Details
.exit_on_failure? ⇒ Boolean
Ensures that thor uses the correct exit code.
44 45 46 |
# File 'lib/codebot/options/core.rb', line 44 def self.exit_on_failure? true end |
Instance Method Details
#interactive ⇒ Object
Runs Codebot interactively.
14 15 16 |
# File 'lib/codebot/options/core.rb', line 14 def interactive run_core(true) end |
#rehash ⇒ Object
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(, &:send_rehash) end |
#start ⇒ Object
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!() fork { run_core(false) } end |
#stop ⇒ Object
Stops a running Codebot instance.
30 31 32 |
# File 'lib/codebot/options/core.rb', line 30 def stop Options.with_ipc_client(, &:send_stop) end |