Update a few broken doc tags

This commit is contained in:
Steven Bazyl 2015-06-25 16:10:51 -07:00
parent a1722c00e7
commit d04c8fa4c5
4 changed files with 11 additions and 8 deletions

View File

@ -35,7 +35,8 @@ module Google
## ##
# Initializes the Storage object. # Initializes the Storage object.
# #
# @params [Object] Storage object # @param [Object] store
# Storage object
def initialize(store) def initialize(store)
@store= store @store= store
@authorization = nil @authorization = nil
@ -44,7 +45,7 @@ module Google
## ##
# Write the credentials to the specified store. # 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 # Optional authorization instance. If not provided, the authorization
# already associated with this instance will be written. # already associated with this instance will be written.
def write_credentials(authorization=nil) def write_credentials(authorization=nil)

View File

@ -45,9 +45,7 @@ module Google
## ##
# Write the credentials to the specified file. # Write the credentials to the specified file.
# #
# @param [Signet::OAuth2::Client] authorization # @param [Hash] credentials_hash
# Optional authorization instance. If not provided, the authorization
# already associated with this instance will be written.
def write_credentials(credentials_hash) def write_credentials(credentials_hash)
open(self.path, 'w+') do |f| open(self.path, 'w+') do |f|
f.write(credentials_hash.to_json) f.write(credentials_hash.to_json)

View File

@ -25,7 +25,10 @@ module Google
## ##
# Initializes the RedisStore object. # 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) def initialize(redis, key = nil)
@redis= redis @redis= redis
@redis_credentials_key = key @redis_credentials_key = key
@ -33,6 +36,7 @@ module Google
## ##
# Attempt to read in credentials from redis. # Attempt to read in credentials from redis.
# @return [Hash]
def load_credentials def load_credentials
credentials = redis.get redis_credentials_key credentials = redis.get redis_credentials_key
JSON.parse(credentials) if credentials JSON.parse(credentials) if credentials
@ -45,7 +49,7 @@ module Google
## ##
# Write the credentials to redis. # Write the credentials to redis.
# #
# @params [Hash] credentials # @param [Hash] credentials_hash
def write_credentials(credentials_hash) def write_credentials(credentials_hash)
redis.set(redis_credentials_key, credentials_hash.to_json) redis.set(redis_credentials_key, credentials_hash.to_json)
end end

View File

@ -164,7 +164,7 @@ module Google
# HTTP method as symbol (e.g. :get, :post, :put, ...) # HTTP method as symbol (e.g. :get, :post, :put, ...)
# @param [String] url # @param [String] url
# URL to call # URL to call
# @param [Hash<String,String] params # @param [Hash<String,String>] params
# Optional hash of query parameters # Optional hash of query parameters
# @param [#read] body # @param [#read] body
# Optional body for POST/PUT # Optional body for POST/PUT