module Dynamoid::Document
This is the base module for all domain objects that need to be persisted to the database as documents.
Attributes
new_record[RW]
Public Class Methods
new(attrs = {})
click to toggle source
# File lib/dynamoid/document.rb, line 12 def initialize(attrs = {}) @new_record = true @attributes ||= {} self.class.attributes.each {|att| write_attribute(att, attrs[att])} end
Public Instance Methods
==(other)
click to toggle source
# File lib/dynamoid/document.rb, line 18 def ==(other) other.respond_to?(:id) && other.id == self.id end