Class: GetOptions::OptionDefinition

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

Overview

:nodoc: all

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ OptionDefinition

Returns a new instance of OptionDefinition.



403
404
405
406
407
# File 'lib/getoptions.rb', line 403

def initialize(key)
  @key = key.to_sym
  @option_type = :boolean
  @abbreviated = false
end

Instance Attribute Details

#abbreviatedObject

Returns the value of attribute abbreviated.



401
402
403
# File 'lib/getoptions.rb', line 401

def abbreviated
  @abbreviated
end

#argument_typeObject

Returns the value of attribute argument_type.



399
400
401
# File 'lib/getoptions.rb', line 399

def argument_type
  @argument_type
end

#container_typeObject

Returns the value of attribute container_type.



400
401
402
# File 'lib/getoptions.rb', line 400

def container_type
  @container_type
end

#keyObject

Returns the value of attribute key.



397
398
399
# File 'lib/getoptions.rb', line 397

def key
  @key
end

#option_typeObject

Returns the value of attribute option_type.



398
399
400
# File 'lib/getoptions.rb', line 398

def option_type
  @option_type
end

Instance Method Details

#is_abbreviated?Boolean

Returns:

  • (Boolean)


409
410
411
# File 'lib/getoptions.rb', line 409

def is_abbreviated? 
  @abbreviated
end