Module: DynamodbRecord::Fields

Extended by:
ActiveSupport::Concern
Included in:
Document
Defined in:
lib/dynamodb_record/fields.rb

Instance Method Summary collapse

Instance Method Details

#read_attribute(name) ⇒ Object



128
129
130
# File 'lib/dynamodb_record/fields.rb', line 128

def read_attribute(name)
  attributes[name.to_sym]
end

#write_attribute(name, value) ⇒ Object

Return a value



124
125
126
# File 'lib/dynamodb_record/fields.rb', line 124

def write_attribute(name, value)
  attributes[name.to_sym] = self.class.undump_field(value, self.class.attributes[name.to_sym])
end