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