Module: DynamoRecord::Document
- Extended by:
- ActiveSupport::Concern
- Includes:
- Fields, Finders, Persistence, Query
- Defined in:
- lib/dynamo_record/document.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#new_record ⇒ Object
Returns the value of attribute new_record.
Instance Method Summary collapse
Methods included from Persistence
Methods included from Fields
#read_attribute, #write_attribute
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
20 21 22 |
# File 'lib/dynamo_record/document.rb', line 20 def attributes @attributes end |
#new_record ⇒ Object
Returns the value of attribute new_record.
20 21 22 |
# File 'lib/dynamo_record/document.rb', line 20 def new_record @new_record end |
Instance Method Details
#initialize(attrs = {}) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/dynamo_record/document.rb', line 22 def initialize(attrs = {}) @new_record = true @attributes = {} attrs.each do |key, value| send("#{key}=", value) end end |