Class: Couchup::Commands::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/couchup/commands/help.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.describeObject



14
15
16
# File 'lib/couchup/commands/help.rb', line 14

def self.describe
  "Help on the system, 'help :get' will provider help about using get."
end

Instance Method Details

#run(param = nil) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/couchup/commands/help.rb', line 4

def run(param = nil)
  commands = param.nil? ? Commands.constants : [param.camelize]
  commands.each do |stuff|
    k = Commands.const_get(stuff)
    print stuff.underscore
    print (stuff.underscore.size > 10) ? "\t" : "\t\t"  
    puts k.respond_to?(:describe) ? k.describe : "No Help"
  end
end