class DRbQS::Command::Execute

Constants

HELP_MESSAGE

Public Class Methods

new() click to toggle source
Calls superclass method DRbQS::Command::Base::new
# File lib/drbqs/command_line/command_execute.rb, line 11
def initialize
  super(DRbQS::Setting::Execute, HELP_MESSAGE)
end

Public Instance Methods

parse_option(argv) click to toggle source
# File lib/drbqs/command_line/command_execute.rb, line 15
def parse_option(argv)
  args, server_args = split_arguments(argv)
  args = option_parser_base(args) do
    set(:port, '-p NUM', '--port NUM', Integer, 'Set the port number.')
    set(:server, '-s STR', '--server STR', String, 'Set the key of server.')
    set(:node, '-n STR', '--node STR', String, 'Set the comma sparated key of nodes.')
    set(:no_server, '--no-server', 'Not execute server.')
    set(:no_node, '--no-node', 'Not execute node.')
    set(:wait_server_finish, "--wait-server-finish", "Wait finish of server process.")
    set(:information, '-i', '--information', 'Show information.')
    set(:help, '-h', '--help', 'Show this command help and usage of definition file.') do |opt|
      $stdout.print opt
    end
  end
  setting.set_argument(*args)
  setting.server_argument = server_args
end