class XMigra::ImpdeclMigrationAdder::SupportedObjectDeserializer
Attributes
db_specifics[R]
object_name[R]
Public Class Methods
new(object_name, db_specifics)
click to toggle source
# File lib/xmigra/impdecl_migration_adder.rb, line 225 def initialize(object_name, db_specifics) @object_name = object_name @db_specifics = db_specifics end
Public Instance Methods
deserialize(yaml_node)
click to toggle source
# File lib/xmigra/impdecl_migration_adder.rb, line 232 def deserialize(yaml_node) data = yaml_node.to_ruby if klass = ImpdeclMigrationAdder.support_type(yaml_node.tag) klass.new(@object_name, data).extend(@db_specifics) else if data.respond_to? :name= data.name = @object_name elsif data.kind_of? Hash data['name'] = @object_name end data end end