class CLI::Command

Public Class Methods

CLI::Command::app_name → String click to toggle source

Returns Commands.app_name

# File lib/cli/command.rb, line 10
def self.app_name
  CLI::Commands.app_name
end
CLI::Command::command_name → String click to toggle source

Returns command name

# File lib/cli/command.rb, line 18
def self.command_name
  Pathname.new(/(.*)Command/.match(self.name)[1].underscore).basename
end
execute() click to toggle source

Execute command

# File lib/cli/command.rb, line 28
def self.execute
  message = "%s#execute() is not implemented."
  raise NotImpelemntedError.new(message % self.name)
end
CLI::Command#make_return(Hash options) → OpenStruct click to toggle source

Generate a struct including arguments and options

# File lib/cli/command.rb, line 37
def self.make_options(options)
  OpenStruct.new(:arguments => ARGV, :options => options)
end
parse() click to toggle source
# File lib/cli/command.rb, line 22
def self.parse
  message = "%s#parse() is not implemented."
  raise NotImpelemntedError.new(message % self.name)
end