class Rodish::OptionParser

  1. lib/rodish/option_parser.rb
Superclass: OptionParser

Rodish::OptionPaser is a subclass of Ruby’s standard OptionParser (from the optparse library).

Methods

Public Instance

  1. add_officious
  2. halt

Public Instance methods

add_officious()

Don’t add officious, which includes options that call exit. With Rodish, there are no secret options, only options you define.

[show source]
   # File lib/rodish/option_parser.rb
12 def add_officious
13 end
halt(string)

Halt processing with a CommandExit using the given string. This can be used to implement early exits, by calling this method in a block:

on("--version", "show program version") { halt VERSION }
[show source]
   # File lib/rodish/option_parser.rb
20 def halt(string)
21   raise CommandExit, string
22 end