Module: GdatastoreMapper::Base
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActiveModel::Callbacks, ActiveModel::Model, ActiveModel::Validations, ActiveModel::Validations::Callbacks
- Defined in:
- lib/gdatastore_mapper/base.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
16 17 18 |
# File 'lib/gdatastore_mapper/base.rb', line 16 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/gdatastore_mapper/base.rb', line 16 def id @id end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
16 17 18 |
# File 'lib/gdatastore_mapper/base.rb', line 16 def updated_at @updated_at end |
Instance Method Details
#attributes ⇒ Object
52 53 54 |
# File 'lib/gdatastore_mapper/base.rb', line 52 def attributes self.class.attributes end |
#to_entity ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/gdatastore_mapper/base.rb', line 56 def to_entity attributes.each do |attribute| @entity[attribute] = self.send attribute if self.send attribute end @entity end |