Exception: Uchi::Pagy::OptionError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/uchi/pagy/classes/exceptions.rb

Overview

Generic option error

Direct Known Subclasses

RangeError

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#optionObject (readonly)

Returns the value of attribute option.



7
8
9
# File 'lib/uchi/pagy/classes/exceptions.rb', line 7

def option
  @option
end

#pagyObject (readonly)

Returns the value of attribute pagy.



7
8
9
# File 'lib/uchi/pagy/classes/exceptions.rb', line 7

def pagy
  @pagy
end

#valueObject (readonly)

Returns the value of attribute value.



7
8
9
# File 'lib/uchi/pagy/classes/exceptions.rb', line 7

def value
  @value
end