Sha256: dc8eac4a816cfe4c6c4915d225decfd45d60942184dc1582dd4148e9d639dcb3
Contents?: true
Size: 444 Bytes
Versions: 6
Compression:
Stored size: 444 Bytes
Contents
module Doorkeeper module Models module Expirable def expired? expires_in && Time.now > expired_time end def expired_time created_at + expires_in.seconds end def expires_in_seconds expires = (created_at + expires_in.seconds) - Time.now expires_sec = expires.seconds.round(0) expires_sec > 0 ? expires_sec : 0 end private :expired_time end end end
Version data entries
6 entries across 6 versions & 1 rubygems