Class: DRbQS::Setting::Manage
- Includes:
- Command::Argument
- Defined in:
- lib/drbqs/setting/manage.rb
Constant Summary
Constants included from Misc
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #exec(io = nil) ⇒ Object
-
#initialize ⇒ Manage
constructor
A new instance of Manage.
-
#parse! ⇒ Object
If there are invalid arguments, this method raises an error.
Methods included from Command::Argument
check_argument_size, split_arguments
Methods inherited from Base
#clone, #string_for_shell, #value
Methods included from Misc
create_logger, create_uri, output_error, process_running_normally?, random_key, time_to_history_string, time_to_history_string2, uri_drbunix
Constructor Details
#initialize ⇒ Manage
Returns a new instance of Manage.
6 7 8 9 10 |
# File 'lib/drbqs/setting/manage.rb', line 6 def initialize super(:all_keys_defined => true) do set_argument_condition(:>, 0) end end |
Instance Method Details
#exec(io = nil) ⇒ Object
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/drbqs/setting/manage.rb', line 144 def exec(io = nil) @manage = DRbQS::Manage.new case @mode when 'initialize' command_initialize when 'process' command_process(io) when 'status' command_status(io) when 'history' command_history(io) when 'signal' command_signal when 'send' command_send end end |
#parse! ⇒ Object
If there are invalid arguments, this method raises an error.
54 55 56 57 58 59 60 |
# File 'lib/drbqs/setting/manage.rb', line 54 def parse! super ary = get_argument @mode = ary[0].to_s @argv = ary[1..-1] check_all_arguments end |