# class GetoptLong::DSL

DSL-mode parser.

### Attributes

arguments[R]

### Public Class Methods

new(&block) click to toggle source

    # File lib/facets/getoptlong.rb, line 31
    def initialize(&block)
      @arguments = []
      instance_eval(&block)
    end

### Public Instance Methods

flag(*opts) click to toggle source

    # File lib/facets/getoptlong.rb, line 37
    def flag(*opts)
      @arguments << (opts << GetoptLong::NO_ARGUMENT)
    end

optional(*opts) click to toggle source

    # File lib/facets/getoptlong.rb, line 50
    def optional(*opts)
      @arguments << (opts << GetoptLong::OPTIONAL_ARGUMENT)
    end

Also aliased as: opts
opts(*opts)
Alias for: optional
reqs(*opts)
Alias for: required
required(*opts) click to toggle source

    # File lib/facets/getoptlong.rb, line 42
    def required(*opts)
      @arguments << (opts <<  GetoptLong::REQUIRED_ARGUMENT)
    end

Also aliased as: reqs