Exception: LoopsSdk::RateLimitError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/loops_sdk/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(limit, remaining) ⇒ RateLimitError

Returns a new instance of RateLimitError.



35
36
37
38
39
# File 'lib/loops_sdk/base.rb', line 35

def initialize(limit, remaining)
  @limit = limit
  @remaining = remaining
  super("Rate limit of #{limit} requests per second exceeded.")
end

Instance Attribute Details

#limitObject (readonly)

Returns the value of attribute limit.



33
34
35
# File 'lib/loops_sdk/base.rb', line 33

def limit
  @limit
end

#remainingObject (readonly)

Returns the value of attribute remaining.



33
34
35
# File 'lib/loops_sdk/base.rb', line 33

def remaining
  @remaining
end