Exception: Purple::Responses::Body::BodyStructureMismatchError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/purple/responses/body.rb

Instance Method Summary collapse

Constructor Details

#initialize(field, expected_type, actual_value, object) ⇒ BodyStructureMismatchError

Returns a new instance of BodyStructureMismatchError.



11
12
13
# File 'lib/purple/responses/body.rb', line 11

def initialize(field, expected_type, actual_value, object)
  super("Field '#{field}' expected to be of type '#{expected_type}', but got '#{actual_value.class}' with value '#{actual_value}'.\nObject: #{object}")
end