Sha256: 0e58e4f6d9bfb60c38b07b439b8c41e1a4e4a5ad938e86a33593fc98c2395f6c

Contents?: true

Size: 297 Bytes

Versions: 4

Compression:

Stored size: 297 Bytes

Contents

module Zaptec
  class Credentials
    attr_accessor :access_token, :expires_at

    def initialize(access_token, expires_at)
      @access_token = access_token
      @expires_at = expires_at
    end

    def expired?(at = Time.zone.now)
      expires_at.nil? || at >= expires_at
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stekker_zaptec-1.1.1 lib/zaptec/credentials.rb
stekker_zaptec-1.1.0 lib/zaptec/credentials.rb
stekker_zaptec-1.0.1 lib/zaptec/credentials.rb
stekker_zaptec-1.0.0 lib/zaptec/credentials.rb