Exception: RiceBubble::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- RiceBubble::ValidationError
- Defined in:
- lib/rice_bubble.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value:, path:, attribute:) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(value:, path:, attribute:) ⇒ ValidationError
24 25 26 |
# File 'lib/rice_bubble.rb', line 24 def initialize(value:, path:, attribute:) super("#{path} expected #{attribute.description} but received #{value.inspect}") end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
22 23 24 |
# File 'lib/rice_bubble.rb', line 22 def attribute @attribute end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
22 23 24 |
# File 'lib/rice_bubble.rb', line 22 def path @path end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
22 23 24 |
# File 'lib/rice_bubble.rb', line 22 def value @value end |