Class: Opt

Inherits:
Object
  • Object
show all
Defined in:
lib/cmdline_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOpt

Returns a new instance of Opt.



177
178
179
180
181
# File 'lib/cmdline_parser.rb', line 177

def initialize
  @mandatory = false
  @has_value = false
  @activated = false
end

Instance Attribute Details

#activatedObject

Returns the value of attribute activated.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def activated
  @activated
end

#defaultObject

Returns the value of attribute default.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def default
  @default
end

#descObject

Returns the value of attribute desc.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def desc
  @desc
end

#has_valueObject

Returns the value of attribute has_value.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def has_value
  @has_value
end

#longObject

Returns the value of attribute long.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def long
  @long
end

#mandatoryObject

Returns the value of attribute mandatory.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def mandatory
  @mandatory
end

#nameObject

Returns the value of attribute name.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def name
  @name
end

#shortObject

Returns the value of attribute short.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def short
  @short
end

#valueObject

Returns the value of attribute value.



176
177
178
# File 'lib/cmdline_parser.rb', line 176

def value
  @value
end

Instance Method Details

#to_sObject



183
184
185
# File 'lib/cmdline_parser.rb', line 183

def to_s
  value
end