Class: Clin::OptionUnexpectedArgumentError

Inherits:
OptionError show all
Defined in:
lib/clin/errors.rb

Overview

Error when a flag option has an unexpected argument

Instance Method Summary collapse

Methods inherited from CommandLineError

severity

Constructor Details

#initialize(option, value) ⇒ OptionUnexpectedArgumentError

Returns a new instance of OptionUnexpectedArgumentError.



68
69
70
71
72
# File 'lib/clin/errors.rb', line 68

def initialize(option, value)
  @value = value
  message = "Unexpected argument '#{value}' for option #{option}"
  super message, option
end