Class: MetricsSatellite::OptionParser::Argument
- Inherits:
-
Object
- Object
- MetricsSatellite::OptionParser::Argument
- Defined in:
- lib/metrics_satellite/option_parser.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key, description) ⇒ Argument
constructor
A new instance of Argument.
- #to_sym ⇒ Object
Constructor Details
#initialize(key, description) ⇒ Argument
Returns a new instance of Argument.
66 67 68 69 |
# File 'lib/metrics_satellite/option_parser.rb', line 66 def initialize(key, description) @key = key @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
64 65 66 |
# File 'lib/metrics_satellite/option_parser.rb', line 64 def description @description end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
64 65 66 |
# File 'lib/metrics_satellite/option_parser.rb', line 64 def key @key end |
Instance Method Details
#to_sym ⇒ Object
71 72 73 74 75 76 77 78 |
# File 'lib/metrics_satellite/option_parser.rb', line 71 def to_sym str = @key str = without_head_hyphen(str) str = without_head_no(str) str = without_last_equal(str) str = underscored(str) str.to_sym end |