Method: Buildr::CommandLineInterface#help

Defined in:
lib/buildr/core/application_cli.rb

#helpObject



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/buildr/core/application_cli.rb', line 120

def help
  usage
  puts
  puts 'Options:'
  OPTIONS.sort.each do |long, short, mode, desc|
    if mode == GetoptLong::REQUIRED_ARGUMENT
      if desc =~ /\b([A-Z]{2,})\b/
        long = long + "=#{$1}"
      end
    end
    printf "  %-20s (%s)\n", long, short
    printf "      %s\n", desc
  end
  puts
  puts 'For help with your buildfile:'
  puts '  buildr help'
end