class CLASP::Arguments::OptionArgument

Class that represents a parsed option

Attributes

argument_specification[R]

(CLASP::OptionSpecification) The specification matching the argument, or nil

extras[R]

(Object, Hash) The extras associated with the argument

given_hyphens[R]

(Integer) The number of hyphens of the argument as it appeared in the command-line

given_index[R]

(Integer) The command-line index of the argument

given_label[R]

(String) The label of the argument as it appeared in the command-line

given_name[R]

(String) The given name of the argument as it appeared in the command-line

given_value[R]

(String) The given value of the option

name[R]

(String) The resolved name of the argument

value[R]

(????) The value of the option, which may be of a type other than string subject to the option specification's constraint

Public Instance Methods

argument_alias() click to toggle source
DEPRECATED

Use argument_specification

# File lib/clasp/arguments.rb, line 208
def argument_alias; @argument_specification; end
hash() click to toggle source

A hash-code for this instance

# File lib/clasp/arguments.rb, line 233
def hash

        @arg.hash
end
to_s() click to toggle source

(String) The string form of the flag, which is the same as name=value

# File lib/clasp/arguments.rb, line 239
def to_s

        "#{name}=#{value}"
end