Class: School21::BearerAuthCredentials

Inherits:
Object
  • Object
show all
Defined in:
lib/school21/auth/bearer_auth_credentials.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_token:) ⇒ BearerAuthCredentials

Returns a new instance of BearerAuthCredentials.

Raises:

  • (ArgumentError)


7
8
9
10
11
# File 'lib/school21/auth/bearer_auth_credentials.rb', line 7

def initialize(access_token:)
  raise ArgumentError, 'access_token cannot be nil' if access_token.nil?

  @access_token = access_token.access_token
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



5
6
7
# File 'lib/school21/auth/bearer_auth_credentials.rb', line 5

def access_token
  @access_token
end