Skip to content

Commit

Permalink
changed documentation in request.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Intini committed Mar 29, 2014
1 parent 4b1b024 commit dda6400
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/lol/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,28 @@ def perform_request url
response
end

# @return [Redis] returns the cache store
def store
cache_store[:redis]
end

# @return [Boolean] true if the request should be cached
def cached?
cache_store[:cached]
end

# @return [Fixnum] the ttl to apply to cached keys
def ttl
cache_store[:ttl]
end

# Initializes a new Request
# @param api_key [String] the Riot Games API key
# @param region [String] the region you want to use in API calls
# @param cache_store [Redis] the Redis store we want to use
# @param cache_store [Hash]
# @option cache_store [Redis] :redis Redis instance to use
# @option cache_store [Boolean] :cached should the request be cached
# @option cacche_store [Fixnum] :ttl ttl for cache keys
# @return [Request]
def initialize api_key, region, cache_store = {}
@cache_store = cache_store
Expand Down

0 comments on commit dda6400

Please sign in to comment.