Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a0e7828b90
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (27 sloc) 0.759 kb
module Couchup
module Commands
class Help
def run(param = nil)
param.nil? ? show_all : show(param.camelize)
nil
end
def show(command)
k = Commands.const_get(command.to_s)
ap k.describe
end
def show_all
Commands.constants.each do |stuff|
k = Commands.const_get(stuff)
print stuff.underscore
print (stuff.underscore.size > 10) ? "\t" : "\t\t"
ap k.respond_to?(:describe) ? k.describe[:description] : "No Help"
end
end
def self.describe
{ :description => "Help on the system",
:usage => "help [<command>]",
:examples => ["help", "help :get"]}
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.