Class: Representable::Serializer::Hash

Inherits:
Representable::Serializer show all
Defined in:
lib/representable/serializer.rb

Instance Method Summary collapse

Methods inherited from Representable::Serializer

#call

Methods inherited from Deserializer

#call, #initialize

Methods included from Deserializer::Prepare

#prepare, #prepare!, #prepare_for

Constructor Details

This class inherits a constructor from Representable::Deserializer

Instance Method Details

#serialize(hash, *args) ⇒ Object



53
54
55
56
57
# File 'lib/representable/serializer.rb', line 53

def serialize(hash, *args)
  {}.tap do |hsh|
    hash.each { |key, obj| hsh[key] = super(obj, *args) }
  end
end