Method: Optimist.educate

Defined in:
lib/optimist.rb

.educateObject

Displays the help message and dies. Example:

options do
  opt :volume, :default => 0.0
  banner "Usage:\n       \#$0 [options] <name>\nwhere [options] are:\n"
end

Optimist::educate if ARGV.empty?


1266
1267
1268
1269
1270
1271
1272
1273
# File 'lib/optimist.rb', line 1266

def educate
  if @last_parser
    @last_parser.educate
    exit
  else
    raise ArgumentError, "Optimist::educate can only be called after Optimist::options"
  end
end