Class: Google::APIClient::FileStorage Deprecated
- Inherits:
-
Object
- Object
- Google::APIClient::FileStorage
- Defined in:
- lib/google/api_client/auth/file_storage.rb
Overview
Represents cached OAuth 2 tokens stored on local disk in a JSON serialized file. Meant to resemble the serialized format google-api-python-client.googlecode.com/hg/docs/epy/oauth2client.file.Storage-class.html
Instance Attribute Summary collapse
-
#storage ⇒ Object
Returns the value of attribute storage.
Instance Method Summary collapse
- #authorization ⇒ Object
-
#initialize(path) ⇒ FileStorage
constructor
A new instance of FileStorage.
- #load_credentials ⇒ Object
-
#write_credentials(auth = nil) ⇒ Object
Write the credentials to the specified file.
Constructor Details
#initialize(path) ⇒ FileStorage
Returns a new instance of FileStorage.
34 35 36 37 38 |
# File 'lib/google/api_client/auth/file_storage.rb', line 34 def initialize(path) store = Google::APIClient::FileStore.new(path) @storage = Google::APIClient::Storage.new(store) @storage. end |
Instance Attribute Details
#storage ⇒ Object
Returns the value of attribute storage.
32 33 34 |
# File 'lib/google/api_client/auth/file_storage.rb', line 32 def storage @storage end |
Instance Method Details
#authorization ⇒ Object
44 45 46 |
# File 'lib/google/api_client/auth/file_storage.rb', line 44 def storage. end |
#load_credentials ⇒ Object
40 41 42 |
# File 'lib/google/api_client/auth/file_storage.rb', line 40 def load_credentials storage. end |
#write_credentials(auth = nil) ⇒ Object
Write the credentials to the specified file.
54 55 56 |
# File 'lib/google/api_client/auth/file_storage.rb', line 54 def write_credentials(auth=nil) storage.write_credentials(auth) end |