class DTK::Client::CommandBaseOptionParser

Public Class Methods

command_name() click to toggle source
# File lib/parser/adapters/option_parser.rb, line 36
def command_name()
  snake_form(self,"-")
end
execute_from_cli(conn,argv,shell_execute=false) click to toggle source
# File lib/parser/adapters/option_parser.rb, line 27
def self.execute_from_cli(conn,argv,shell_execute=false)
  return conn.connection_error if conn.connection_error
  method, args_hash = OptionParser.parse_options(self,argv)
  instance = new(conn)
  raise Error.new("Illegal subcommand #{method}") unless instance.respond_to?(method)
  instance.send(method,args_hash)
end
new(conn) click to toggle source
# File lib/parser/adapters/option_parser.rb, line 23
def initialize(conn)
  @conn = conn
end