Parent

Clamp::Help::Builder

Constants

DETAIL_FORMAT

Public Class Methods

new() click to toggle source
# File lib/clamp/help.rb, line 55
def initialize
  @out = StringIO.new
end

Public Instance Methods

add_description(description) click to toggle source
# File lib/clamp/help.rb, line 70
def add_description(description)
  if description
    puts ""
    puts description.gsub(/^/, "  ")
  end
end
add_list(heading, items) click to toggle source
# File lib/clamp/help.rb, line 79
def add_list(heading, items)
  puts "\n#{heading}:"
  items.each do |item|
    label, description = item.help
    description.each_line do |line|
      puts DETAIL_FORMAT % [label, line]
      label = ''
    end
  end
end
add_usage(invocation_path, usage_descriptions) click to toggle source
# File lib/clamp/help.rb, line 63
def add_usage(invocation_path, usage_descriptions)
  puts usage_heading
  usage_descriptions.each do |usage|
    puts "    #{invocation_path} #{usage}".rstrip
  end
end
string() click to toggle source
# File lib/clamp/help.rb, line 59
def string
  @out.string
end

Protected Instance Methods

usage_heading() click to toggle source
# File lib/clamp/help.rb, line 92
def usage_heading
  "Usage:"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.