Class: ErpIntegration::RateLimiter::Unlimited

Inherits:
Object
  • Object
show all
Defined in:
lib/erp_integration/rate_limiter.rb

Overview

Unlimited is a rate limiter that allows all requests. When the rate limiter wasn’t found by the API key, it defaults to this class. Or if the ‘rate_limiters` option is not set in the configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUnlimited

Returns a new instance of Unlimited.



76
77
78
# File 'lib/erp_integration/rate_limiter.rb', line 76

def initialize
  @name = 'unlimited'
end

Instance Attribute Details

#nameObject (readonly)

Executes the block without any restrictions.



74
75
76
# File 'lib/erp_integration/rate_limiter.rb', line 74

def name
  @name
end

Instance Method Details

#within_limitObject



80
81
82
# File 'lib/erp_integration/rate_limiter.rb', line 80

def within_limit
  yield
end