Exception: Uchi::Pagy::OptionError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Uchi::Pagy::OptionError
- Defined in:
- lib/uchi/pagy/classes/exceptions.rb
Overview
Generic option error
Direct Known Subclasses
Instance Attribute Summary collapse
-
#option ⇒ Object
readonly
Returns the value of attribute option.
-
#pagy ⇒ Object
readonly
Returns the value of attribute pagy.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(pagy, option, description, value) ⇒ OptionError
constructor
Set the options and prepare the message.
Constructor Details
#initialize(pagy, option, description, value) ⇒ OptionError
Set the options and prepare the message
10 11 12 13 14 15 |
# File 'lib/uchi/pagy/classes/exceptions.rb', line 10 def initialize(pagy, option, description, value) @pagy = pagy @option = option @value = value super("expected :#{@option} #{description}; got #{@value.inspect}") end |
Instance Attribute Details
#option ⇒ Object (readonly)
Returns the value of attribute option.
7 8 9 |
# File 'lib/uchi/pagy/classes/exceptions.rb', line 7 def option @option end |
#pagy ⇒ Object (readonly)
Returns the value of attribute pagy.
7 8 9 |
# File 'lib/uchi/pagy/classes/exceptions.rb', line 7 def pagy @pagy end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/uchi/pagy/classes/exceptions.rb', line 7 def value @value end |