Parent

Files

GetoptLong::DSL

DSL-mode parser.

Attributes

arguments[R]

Public Class Methods

new(&block) click to toggle source
# File lib/facets/standard/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/standard/facets/getoptlong.rb, line 37
def flag(*opts)
  @arguments << (opts << GetoptLong::NO_ARGUMENT)
end
optional(*opts) click to toggle source
# File lib/facets/standard/facets/getoptlong.rb, line 50
def optional(*opts)
  @arguments << (opts << GetoptLong::OPTIONAL_ARGUMENT)
end
Also aliased as: opts
opts(*opts) click to toggle source
Alias for: optional
reqs(*opts) click to toggle source
Alias for: required
required(*opts) click to toggle source
# File lib/facets/standard/facets/getoptlong.rb, line 42
def required(*opts)
  @arguments << (opts <<  GetoptLong::REQUIRED_ARGUMENT)
end
Also aliased as: reqs

[Validate]

Generated with the Darkfish Rdoc Generator 2.