Exception: CommandOptionError
- Inherits:
-
StandardError
- Object
- StandardError
- CommandOptionError
- Defined in:
- lib/kwalify/util/option-parser.rb
Overview
$Rev$ $Release: 0.7.2 $ copyright© 2005-2010 kuwata-lab all rights reserved.
Instance Attribute Summary collapse
-
#error_symbol ⇒ Object
readonly
Returns the value of attribute error_symbol.
-
#option ⇒ Object
readonly
Returns the value of attribute option.
Instance Method Summary collapse
-
#initialize(option, error_symbol, message = nil) ⇒ CommandOptionError
constructor
A new instance of CommandOptionError.
Constructor Details
#initialize(option, error_symbol, message = nil) ⇒ CommandOptionError
Returns a new instance of CommandOptionError.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/kwalify/util/option-parser.rb', line 8 def initialize(option, error_symbol, =nil) if ! case error_symbol when :no_argument = "-%s: argument required." % option when :unknown_option = "-%s: unknown option." % option when :invalid_property = "-%s: invalid property." % option else = "*** internal error(optchar=#{option}, error_symbol=#{error_symbol}) ***" end end super() @option = option @error_symbol = error_symbol end |
Instance Attribute Details
#error_symbol ⇒ Object (readonly)
Returns the value of attribute error_symbol.
26 27 28 |
# File 'lib/kwalify/util/option-parser.rb', line 26 def error_symbol @error_symbol end |
#option ⇒ Object (readonly)
Returns the value of attribute option.
26 27 28 |
# File 'lib/kwalify/util/option-parser.rb', line 26 def option @option end |