Class: Aws::Token

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, expiration = nil) ⇒ Token

Returns a new instance of Token.

Parameters:

  • token (String)
  • expiration (Time) (defaults to: nil)


8
9
10
11
# File 'gems/aws-sdk-core/lib/aws-sdk-core/token.rb', line 8

def initialize(token, expiration=nil)
  @token = token
  @expiration = expiration
end

Instance Attribute Details

#expirationTime? (readonly)

Returns:

  • (Time, nil)


17
18
19
# File 'gems/aws-sdk-core/lib/aws-sdk-core/token.rb', line 17

def expiration
  @expiration
end

#tokenString? (readonly)

Returns:

  • (String, nil)


14
15
16
# File 'gems/aws-sdk-core/lib/aws-sdk-core/token.rb', line 14

def token
  @token
end

Instance Method Details

#set?Boolean

Returns true if token is set

Returns:

  • (Boolean)

    Returns true if token is set



20
21
22
# File 'gems/aws-sdk-core/lib/aws-sdk-core/token.rb', line 20

def set?
  !token.nil? && !token.empty?
end