Parent

Namespace

Methods

Files

GetoptLong

GetoptLong

Ruby’s standard GetoptLong class with an added DSL.

opts = GetoptLong.new do
  reqs '--expect', '-x'
  flag '--help', '-h'
end

See GetoptLong::DSL for details.

Public Class Methods

new(*arguments, &block) click to toggle source
# File lib/facets/getoptlong.rb, line 19
def initialize(*arguments, &block)
  if block_given?
    raise ArgumentError unless arguments.empty?
    arguments = DSL.new(&block).arguments
  end
  init(*arguments)
end
Also aliased as: init

Public Instance Methods

init(*arguments, &block) click to toggle source
Alias for: new

[Validate]

Generated with the Darkfish Rdoc Generator 2.