Exception: Transat::UnknownOptions

Inherits:
StandardError
  • Object
show all
Defined in:
lib/transat/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, unrecognized_options) ⇒ UnknownOptions

Returns a new instance of UnknownOptions.



44
45
46
# File 'lib/transat/parser.rb', line 44

def initialize(command, unrecognized_options)
  @command, @unrecognized_options = command, unrecognized_options
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



42
43
44
# File 'lib/transat/parser.rb', line 42

def command
  @command
end

Instance Method Details

#messageObject



48
49
50
# File 'lib/transat/parser.rb', line 48

def message
  "Command #{@command} does not accept options #{@unrecognized_options.join(", ")}"
end