Class: Basketcase::HelpCommand
Instance Attribute Summary
Attributes inherited from Command
#comment, #listener, #targets
Instance Method Summary
collapse
Methods inherited from Command
#accept_args, #effective_targets, #initialize, #option_comment, #option_graphical, #option_recurse, #report, #specified_targets
Methods included from Utils
#mkpath
Instance Method Details
#execute ⇒ Object
288
289
290
291
292
293
294
295
296
297
298
299
300
|
# File 'lib/basketcase.rb', line 288
def execute
if @targets.empty?
puts @basketcase.usage
exit
end
@targets.each do |command_name|
command = make_command(command_name)
puts
puts "% basketcase #{command_name} #{command.synopsis}"
puts
puts command.help.gsub(/^/, " ")
end
end
|
#help ⇒ Object
284
285
286
|
# File 'lib/basketcase.rb', line 284
def help
"Display usage instructions."
end
|
#synopsis ⇒ Object
280
281
282
|
# File 'lib/basketcase.rb', line 280
def synopsis
"[<command>]"
end
|