Module: API::Helpers::RateLimiter
- Defined in:
- lib/api/helpers/rate_limiter.rb
Instance Method Summary collapse
Instance Method Details
#check_rate_limit!(key, scope) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/api/helpers/rate_limiter.rb', line 6 def check_rate_limit!(key, scope) if rate_limiter.throttled?(key, scope: scope) log_request(key) render_exceeded_limit_error! end end |