Exception: RakeCommander::Options::Error::UnknownArgument
- Inherits:
-
Base
- Object
- StandardError
- Base::CustomError
- Base
- RakeCommander::Options::Error::UnknownArgument
- Defined in:
- lib/rake-commander/options/error/unknown_argument.rb
Overview
Relates to OptionParser#parse
output (leftovers)
Constant Summary
Constants inherited from Base
Constants included from Name
Name::BOOLEAN_NAME_REGEX, Name::BOOLEAN_TOKEN, Name::DOUBLE_HYPHEN_REGEX, Name::HYPEN_REGEX, Name::HYPHEN_START_REGEX, Name::OPTIONAL_REGEX, Name::SINGLE_HYPHEN_REGEX, Name::UNDERSCORE_REGEX, Name::WORD_DELIMITER
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(value = nil, from: nil) ⇒ UnknownArgument
constructor
A new instance of UnknownArgument.
- #leftovers ⇒ Object
Methods inherited from Base
#from_desc, #name?, option_regex, option_sym, #option_sym, #options, require_argument!, #short?
Methods included from Name
#argument_optional?, #argument_required?, #boolean_name?, #capture_argument_with!, #capture_arguments_name!, #capture_arguments_short!, #double_hyphen?, #name_argument, #name_argument?, #name_hyphen, #name_sym, #name_word_sym, #short_hyphen, #short_sym, #single_hyphen?, #valid_name?, #valid_short?
Methods inherited from Base::CustomError
Constructor Details
#initialize(value = nil, from: nil) ⇒ UnknownArgument
Returns a new instance of UnknownArgument.
6 7 8 |
# File 'lib/rake-commander/options/error/unknown_argument.rb', line 6 def initialize(value = nil, from: nil) super("unknown arguments: #{(value)}", from: from) end |
Instance Method Details
#leftovers ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rake-commander/options/error/unknown_argument.rb', line 10 def leftovers case @value when Array @value else [] end end |