Class GetoptLong
In: lib/facets/standard/facets/getoptlong.rb
Parent: Object

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.

Methods

new  

Classes and Modules

Class GetoptLong::DSL

External Aliases

initialize -> init

Public Class methods

[Source]

# File lib/facets/standard/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

[Validate]