Module: FIRM::Serializable::YAML::YamlSerializePatch

Defined in:
lib/firm/serializer/yaml.rb

Constant Summary collapse

ALLOWED_ALIASES =
[Serializable::ID]

Instance Method Summary collapse

Instance Method Details

#revive(klass, node) ⇒ Object



34
35
36
37
38
39
40
41
42
# File 'lib/firm/serializer/yaml.rb', line 34

def revive(klass, node)
  if FIRM::Serializable > klass
    s = register(node, klass.allocate)
    s.__send__(:init_from_serialized, data = revive_hash({}, node, true))
    init_with(s, data, node)
  else
    super
  end
end