### Home Classes Methods

### In Files

- lib/facets/getoptlong.rb

### Parent

Object

### Namespace

- CLASS GetoptLong::DSL

### Methods

- ::new
- #init

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Random
- Random::ArrayExtensions
- Random::HashExtensions
- Random::IntegerExtensions
- Random::NumericExtensions
- Random::RangeExtensions
- Random::StringExtensions
- Random::StringExtensions::Self
- FileUtils
- FileUtils::DryRun
- FileUtils::NoWrite
- FileUtils::Verbose
- Digest
- Digest::Class
- Digest::Instance
- Multiton
- Multiton::Inclusive
- Multiton::MetaMethods
- URI
- URI::Hash
- URI::Kernel
- Argvector
- Argvector
- ERB
- ERB::OpenTemplate
- Enumerable
- Enumerable::Arguments
- GetoptLong
- GetoptLong::DSL
- Memoizable
- Memoizable::Copy
- Numeric
- Numeric::Multipliers
- Object
- Object::ArgVector
- Timer
- Timer::Dummy
- Array
- BasicObject
- CGI
- Cloneable
- Continuation
- Date
- DateTime
- Equitable
- File
- Find
- Hash
- Instantiable
- Integer
- Interval
- Kernel
- Math
- Module
- Net
- NilClass
- NullClass
- OpEsc
- OpenStruct
- Pathname
- Platform
- Range
- RbConfig
- Set
- Shellwords
- String
- StringScanner
- Time
- Tuple
- YAML
- Zlib

No matching classes.

# 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.