lib/rack/throttle/limiter.rb in rack-throttle-0.2.0 vs lib/rack/throttle/limiter.rb in rack-throttle-0.3.0
- old
+ new
@@ -12,12 +12,12 @@
class Limiter
attr_reader :app
attr_reader :options
##
- # @param [#call] app
- # @param [Hash{Symbol => Object}] options
+ # @param [#call] app
+ # @param [Hash{Symbol => Object}] options
# @option options [String] :cache (Hash.new)
# @option options [String] :key (nil)
# @option options [String] :key_prefix (nil)
# @option options [Integer] :code (403)
# @option options [String] :message ("Rate Limit Exceeded")
@@ -83,10 +83,10 @@
protected
##
# @return [Hash]
def cache
- case cache = (@options[:cache] ||= {})
+ case cache = (options[:cache] ||= {})
when Proc then cache.call
else cache
end
end