Method: Chokepoint::Limiter#initialize

Defined in:
lib/chokepoint/limiter.rb

#initialize(name, options = {}) ⇒ Limiter

Returns a new instance of Limiter.

Parameters:

  • name (String)
  • options (Hash{Symbol => Object}) (defaults to: {})

Options Hash (options):

  • :cache (String) — default: Hash.new
  • :key_prefix (String) — default: nil
  • :code (Integer) — default: 403
  • :message (String) — default: "Rate Limit Exceeded"


23
24
25
# File 'lib/chokepoint/limiter.rb', line 23

def initialize(name, options = {})
  @name, @options = name, options
end