Class: GoogleSpreadsheetFetcher::Authorizer::Oauth2::Config
- Inherits:
-
Object
- Object
- GoogleSpreadsheetFetcher::Authorizer::Oauth2::Config
- Defined in:
- lib/google_spreadsheet_fetcher/authorizer/oauth2/config.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secrets_json_path ⇒ Object
readonly
Returns the value of attribute client_secrets_json_path.
-
#token_store ⇒ Object
readonly
Returns the value of attribute token_store.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(client_secrets_json_path: nil, user_id: nil, token_store: nil) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(client_secrets_json_path: nil, user_id: nil, token_store: nil) ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 12 13 14 |
# File 'lib/google_spreadsheet_fetcher/authorizer/oauth2/config.rb', line 7 def initialize(client_secrets_json_path: nil, user_id: nil, token_store: nil) @client_secrets_json_path = client_secrets_json_path || ::GoogleSpreadsheetFetcher.config.client_secrets_file @user_id = user_id || ::GoogleSpreadsheetFetcher.config.user_id @token_store = token_store || default_token_store @client_id = ::Google::Auth::ClientId.from_file(self.client_secrets_json_path) freeze end |
Instance Attribute Details
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
5 6 7 |
# File 'lib/google_spreadsheet_fetcher/authorizer/oauth2/config.rb', line 5 def client_id @client_id end |
#client_secrets_json_path ⇒ Object (readonly)
Returns the value of attribute client_secrets_json_path.
5 6 7 |
# File 'lib/google_spreadsheet_fetcher/authorizer/oauth2/config.rb', line 5 def client_secrets_json_path @client_secrets_json_path end |
#token_store ⇒ Object (readonly)
Returns the value of attribute token_store.
5 6 7 |
# File 'lib/google_spreadsheet_fetcher/authorizer/oauth2/config.rb', line 5 def token_store @token_store end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
5 6 7 |
# File 'lib/google_spreadsheet_fetcher/authorizer/oauth2/config.rb', line 5 def user_id @user_id end |