Exception: TrafficJam::Errors::LimitExceededError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/traffic_jam/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(limit) ⇒ LimitExceededError

Returns a new instance of LimitExceededError.



8
9
10
11
# File 'lib/traffic_jam/errors.rb', line 8

def initialize(limit)
  super("Rate limit exceeded: #{limit.action}")
  @limit = limit
end

Instance Attribute Details

#limitObject

Returns the value of attribute limit.



6
7
8
# File 'lib/traffic_jam/errors.rb', line 6

def limit
  @limit
end