Module: Doorkeeper::Rethinkdb::Timestamps
- Extended by:
- ActiveSupport::Concern
- Included in:
- AccessToken
- Defined in:
- lib/support/orm/rethinkdb/timestamps.rb
Instance Method Summary collapse
Instance Method Details
#created_at ⇒ Object
27 28 29 |
# File 'lib/support/orm/rethinkdb/timestamps.rb', line 27 def created_at Time.at(super) end |
#revoked_at ⇒ Object
13 14 15 16 |
# File 'lib/support/orm/rethinkdb/timestamps.rb', line 13 def revoked_at revoked = super Time.at(revoked) unless revoked.nil? end |
#revoked_at=(time) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/support/orm/rethinkdb/timestamps.rb', line 18 def revoked_at=(time) if time number = time.is_a?(Numeric) ? time.to_i : time.to_time.to_i super number else super nil end end |