Module: Boson::Command::API

Included in:
Boson::Command
Defined in:
lib/boson/command.rb

Instance Method Summary collapse

Instance Method Details

#after_initialize(hash) ⇒ Object

Called after initialize



91
92
# File 'lib/boson/command.rb', line 91

def after_initialize(hash)
end

#basic_usageObject Also known as: usage

One-line usage of args



100
101
102
103
104
105
# File 'lib/boson/command.rb', line 100

def basic_usage
  return '' if args.nil?
  usage_args.map {|e|
    (e.size < 2) ? e[0].upcase : "[#{e[0].upcase}]"
  }.join(' ')
end

#full_nameObject

Alias for a name but plugins may use it to give a more descriptive name



95
96
97
# File 'lib/boson/command.rb', line 95

def full_name
  name
end

#option_command?Boolean

Indicates if an OptionCommand



109
110
111
# File 'lib/boson/command.rb', line 109

def option_command?
  options || @option_command
end