Module: Arkenstone::Timestamps::InstanceMethods
- Defined in:
- lib/arkenstone/timestamps.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#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.
12 13 14 |
# File 'lib/arkenstone/timestamps.rb', line 12 def created_at @created_at end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
12 13 14 |
# File 'lib/arkenstone/timestamps.rb', line 12 def updated_at @updated_at end |
Instance Method Details
#timestamp ⇒ Object
18 19 20 21 22 |
# File 'lib/arkenstone/timestamps.rb', line 18 def current_time = Time.now self.created_at = current_time unless created_at self.updated_at = current_time end |
#timestampable ⇒ Object
14 15 16 |
# File 'lib/arkenstone/timestamps.rb', line 14 def true end |