Class: Aws::Token

Inherits:
Object
  • Object
show all
Defined in:
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 '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 'lib/aws-sdk-core/token.rb', line 17

def expiration
  @expiration
end

#tokenString? (readonly)

Returns:

  • (String, nil)


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

def token
  @token
end

Instance Method Details

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Removing the token from the default inspect string.



26
27
28
# File 'lib/aws-sdk-core/token.rb', line 26

def inspect
  "#<#{self.class.name} token=[FILTERED]> expiration=#{expiration}>"
end

#set?Boolean

Returns ‘true` if token is set

Returns:

  • (Boolean)

    Returns ‘true` if token is set



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

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