class BigShift::AccessToken
Attributes
access_token[RW]
expires[RW]
Public Class Methods
new(hash = {})
click to toggle source
# File lib/big_shift/models/access_token.rb, line 5 def initialize(hash = {}) @access_token = hash['access_token'] @expires = hash['expires_in'] @created = Time.now end
Public Instance Methods
expired?()
click to toggle source
# File lib/big_shift/models/access_token.rb, line 11 def expired? Time.now - @created > (expires - 10) end