Class: GetoptLong::DSL

Class | GetoptLong::DSL
In: | lib/more/facets/getoptlong.rb
Parent: | Object

DSL-mode parser.

### Methods

flag new optional opts reqs required

### Attributes

arguments | [R] |

### Public Class methods

new(&block)

[Source]

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

### Public Instance methods

flag(*opts)

[Source]

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

optional(*opts)

[Source]

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

opts(*opts)

Alias for optional

reqs(*opts)

Alias for required

required(*opts)

[Source]

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

[Validate]