Class: Daemons::Controller

Class | Daemons::Controller
In: | lib/daemons/cmdline.rb lib/daemons/controller.rb
Parent: | Object

### Methods

catch_exceptions new print_usage run setup_options split_argv

### Constants

COMMANDS | = | [ 'start', 'stop', 'restart', 'run', 'zap', 'status'

### Attributes

app_name | [R] |
group | [R] |
options | [R] |

### Public Class methods

new(options = {}, argv = [])
split_argv(argv)

Split an argv array. `argv` is assumed to be in the following format:

      ['command', 'controller option 1', 'controller option 2', ..., '--', 'app option 1', ...]

`command` must be one of the commands listed in `COMMANDS`

Returns: the command as a string, the controller options as an array, the appliation options as an array

### Public Instance methods

catch_exceptions(&block)
print_usage()
run()
setup_options()

This function is used to do a final update of the options passed to the application before they are really used.

Note that this function should only update `@options` and no other variables.

[Validate]