lib/traffic_jam/configuration.rb
# Get registered limit parameters for an action.
#
# @see #register
# @param action [Symbol] action name
# @return [Hash] max and period parameters in a hash
# @raise [TrafficJam::LimitNotFound] if action is not registered
Get registered limit parameters for an action.
Get registered limit parameters for an action .
def limits(action)
      @limits ||= {}
      limits = @limits[action.to_sym]
      raise TrafficJam::LimitNotFound.new(action) if limits.nil?
      limits
    end
def limits ( action ) @limits ||= { } limits = @limits [ action . to_sym ] raise TrafficJam :: LimitNotFound . new ( action ) if limits . nil? limits end
Get registered limit parameters for an action.
Get registered limit parameters for an action .
max and period parameters in a hash
max and period parameters in a hash
Hash
[TrafficJam::LimitNotFound] if action is not registered
[ TrafficJam :: LimitNotFound ] if action is not registered
action
None
see
None