Exception: RiceBubble::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rice_bubble.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributeObject (readonly)

Returns the value of attribute attribute.



22
23
24
# File 'lib/rice_bubble.rb', line 22

def attribute
  @attribute
end

#pathObject (readonly)

Returns the value of attribute path.



22
23
24
# File 'lib/rice_bubble.rb', line 22

def path
  @path
end

#valueObject (readonly)

Returns the value of attribute value.



22
23
24
# File 'lib/rice_bubble.rb', line 22

def value
  @value
end