Exception: Transmutation::Serialization::Lookup::SerializerNotFound

Inherits:
Error
  • Object
show all
Defined in:
lib/transmutation/serialization/lookup/serializer_not_found.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, namespace: nil, name: nil) ⇒ SerializerNotFound

Returns a new instance of SerializerNotFound.



10
11
12
13
14
15
16
17
18
19
# File 'lib/transmutation/serialization/lookup/serializer_not_found.rb', line 10

def initialize(object, namespace: nil, name: nil)
  @object = object
  @namespace = namespace
  @name = name

  super [
    "Couldn't find serializer for #{object.class.name}#{namespace.empty? ? "" : " in #{namespace}"}.",
    "Tried looking for the following classes: #{attempted_lookups}."
  ].join(" ")
end

Instance Attribute Details

#nameObject (readonly)



8
9
10
# File 'lib/transmutation/serialization/lookup/serializer_not_found.rb', line 8

def name
  @name
end

#namespaceObject (readonly)



8
9
10
# File 'lib/transmutation/serialization/lookup/serializer_not_found.rb', line 8

def namespace
  @namespace
end

#objectObject (readonly)



8
9
10
# File 'lib/transmutation/serialization/lookup/serializer_not_found.rb', line 8

def object
  @object
end