# File lib/clamp/help.rb, line 30 def derived_usage_description parts = ["[OPTIONS]"] parts += parameters.map { |a| a.name } parts.join(" ") end
# File lib/clamp/help.rb, line 15 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 40 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(Clamp.message(:parameters_heading), parameters) end if has_subcommands? help.add_list(Clamp.message(:subcommands_heading), recognised_subcommands) end help.add_list(Clamp.message(:options_heading), recognised_options) help.string end
Generated with the Darkfish Rdoc Generator 2.