# File lib/clamp/help.rb, line 29 def derived_usage_description parts = ["[OPTIONS]"] parts += parameters.map { |a| a.name } parts.join(" ") end
# File lib/clamp/help.rb, line 14 def description=(description) @description = description.dup if @description =~ /^\A\n*( +)/ indent = $1 @description.gsub!(/^#{indent}/, '') end @description.strip! end
# File lib/clamp/help.rb, line 39 def help(invocation_path, builder = Builder.new) help = builder help.add_usage(invocation_path, usage_descriptions) help.add_description(description) if has_parameters? help.add_list("Parameters", parameters) end if has_subcommands? help.add_list("Subcommands", recognised_subcommands) end help.add_list("Options", recognised_options) help.string end
Generated with the Darkfish Rdoc Generator 2.