Exception: Slop::UnknownOption

Inherits:
Error
  • Object
show all
Defined in:
lib/slop/error.rb

Overview

Raised when an unknown option is parsed or when trying to fetch an unexisting option via `Slop::Result#fetch`. Suppress with the `suppress_errors` config option.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, flag) ⇒ UnknownOption

Returns a new instance of UnknownOption



31
32
33
34
# File 'lib/slop/error.rb', line 31

def initialize(msg, flag)
  super(msg)
  @flag = flag
end

Instance Attribute Details

#flagObject (readonly)

Returns the value of attribute flag



29
30
31
# File 'lib/slop/error.rb', line 29

def flag
  @flag
end