class SimpleJsonapi::SerializerInferenceError
The error raised when a {SerializerInferrer} cannot find the serializer for a resource or error.
Attributes
object[R]
Public Class Methods
new(object, msg = nil)
click to toggle source
@param object [Object] the resource or error @param msg [String]
# File lib/simple_jsonapi/helpers/exceptions.rb, line 30 def initialize(object, msg = nil) @object = object @msg = msg end
Public Instance Methods
to_s()
click to toggle source
# File lib/simple_jsonapi/helpers/exceptions.rb, line 35 def to_s @msg.present? ? @msg : "Unable to infer serializer for #{object.class}" end