Class: HowMany::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/how_many/config.rb

Overview

Provides an object to store global configuration settings.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Initialize the global configuration settings, using the values of the specified following environment variables by default.



19
20
21
22
23
# File 'lib/how_many/config.rb', line 19

def initialize
  @client_id = ENV['HOW_MANY_CLIENT_ID']
  @client_secret = ENV['HOW_MANY_CLIENT_SECRET']
  @refresh_token = ENV['HOW_MANY_REFRESH_TOKEN']
end

Instance Attribute Details

#client_idString

Returns the Client ID for the CMS-enabled YouTube app.

Returns:

  • (String)

    the Client ID for the CMS-enabled YouTube app.

See Also:



8
9
10
# File 'lib/how_many/config.rb', line 8

def client_id
  @client_id
end

#client_secretString

Returns the Client Secret for the CMS-enabled YouTube app.

Returns:

  • (String)

    the Client Secret for the CMS-enabled YouTube app.

See Also:



12
13
14
# File 'lib/how_many/config.rb', line 12

def client_secret
  @client_secret
end

#refresh_tokenString

Returns the refresh token for the CMS user.

Returns:

  • (String)

    the refresh token for the CMS user.



15
16
17
# File 'lib/how_many/config.rb', line 15

def refresh_token
  @refresh_token
end