Exception: ThrottleMachines::ThrottledError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/throttle_machines/throttled_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(limiter) ⇒ ThrottledError

Returns a new instance of ThrottledError.



7
8
9
10
# File 'lib/throttle_machines/throttled_error.rb', line 7

def initialize(limiter)
  @limiter = limiter
  super("Rate limit exceeded for #{limiter.key}")
end

Instance Attribute Details

#limiterObject (readonly)

Returns the value of attribute limiter.



5
6
7
# File 'lib/throttle_machines/throttled_error.rb', line 5

def limiter
  @limiter
end