module Dynamo::Record::Model::InstanceMethods

Public Instance Methods

attribute_hash() click to toggle source
# File lib/dynamo/record/model.rb, line 122
def attribute_hash
  attrs = self.class.attributes.attributes
  attr_keys = attrs.keys
  hash = {}

  attr_keys.each do |key|
    hash[key] = attrs[key].type_cast(send(key))
  end
  hash
end
read_attribute_for_serialization(attribute) click to toggle source
# File lib/dynamo/record/model.rb, line 118
def read_attribute_for_serialization(attribute)
  send(attribute)
end