README.md in rlimiter-1.0.2 vs README.md in rlimiter-1.0.3
- old
+ new
@@ -63,11 +63,11 @@
```ruby
@phone_number = '2947126943'
@limit_key = generate_limit_key
@limit_count = fetch_limit_count
- limit_breached = Rlimiter.limit(@limit_key, @limit_count, DEFAULT_LIMIT_DURATION)
- unless limit_breached
+ limit_not_breached = Rlimiter.limit(@limit_key, @limit_count, DEFAULT_LIMIT_DURATION)
+ if limit_not_breached
{
:status_code => 200,
:otp_dispatch_status => send_mobile_otp,
:requests_left => @limit_count - Rlimiter.current_count(@limit_key)
}