Update a few broken doc tags
This commit is contained in:
1 parent
a1722c00e7
commit
d04c8fa4c5
4 files changed
+11
-8
No files matched your search
@@ -35,7 +35,8 @@ module Google
|
||||
##
|
||||
# Initializes the Storage object.
|
||||
#
|
||||
# @params [Object] Storage object
|
||||
# @param [Object] store
|
||||
# Storage object
|
||||
def initialize(store)
|
||||
@store= store
|
||||
@authorization = nil
|
||||
@@ -44,7 +45,7 @@ module Google
|
||||
##
|
||||
# Write the credentials to the specified store.
|
||||
#
|
||||
# @params [Signet::OAuth2::Client] authorization
|
||||
# @param [Signet::OAuth2::Client] authorization
|
||||
# Optional authorization instance. If not provided, the authorization
|
||||
# already associated with this instance will be written.
|
||||
def write_credentials(authorization=nil)
|
||||
|
||||
@@ -45,9 +45,7 @@ module Google
|
||||
##
|
||||
# Write the credentials to the specified file.
|
||||
#
|
||||
# @param [Signet::OAuth2::Client] authorization
|
||||
# Optional authorization instance. If not provided, the authorization
|
||||
# already associated with this instance will be written.
|
||||
# @param [Hash] credentials_hash
|
||||
def write_credentials(credentials_hash)
|
||||
open(self.path, 'w+') do |f|
|
||||
f.write(credentials_hash.to_json)
|
||||
|
||||
@@ -25,7 +25,10 @@ module Google
|
||||
##
|
||||
# Initializes the RedisStore object.
|
||||
#
|
||||
# @params [Object] Redis instance
|
||||
# @param [Object] redis
|
||||
# Redis instance
|
||||
# @param [Object] key
|
||||
# Optional key to store credentials under. Defaults to 'google_api_credentials'
|
||||
def initialize(redis, key = nil)
|
||||
@redis= redis
|
||||
@redis_credentials_key = key
|
||||
@@ -33,6 +36,7 @@ module Google
|
||||
|
||||
##
|
||||
# Attempt to read in credentials from redis.
|
||||
# @return [Hash]
|
||||
def load_credentials
|
||||
credentials = redis.get redis_credentials_key
|
||||
JSON.parse(credentials) if credentials
|
||||
@@ -45,7 +49,7 @@ module Google
|
||||
##
|
||||
# Write the credentials to redis.
|
||||
#
|
||||
# @params [Hash] credentials
|
||||
# @param [Hash] credentials_hash
|
||||
def write_credentials(credentials_hash)
|
||||
redis.set(redis_credentials_key, credentials_hash.to_json)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user