Module: DataMapper::Is::Serialized::InstanceMethods

Defined in:
lib/dm-is-serialized/is/serialized.rb

Instance Method Summary collapse

Instance Method Details

#serializeObject



56
57
58
59
60
61
62
63
64
# File 'lib/dm-is-serialized/is/serialized.rb', line 56

def serialize
  self.class.serialized_properties.map do |property_name, filter_class|
    filter = filter_class.new
    filter.record = self
    filter.name = property_name
    data   = self.send(property_name)
    data.nil? ? String.new : filter.serialize(data)
  end.join(",")
end