From 36b5116d9a771bb40821a40a9a23291c77557921 Mon Sep 17 00:00:00 2001 From: James Cowlishaw Date: Mon, 23 Jan 2017 12:26:51 +0000 Subject: [PATCH] Fixed documentation Added Ratelimit#add call to Ratelimit#exec_within_threshold example. --- lib/ratelimit.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ratelimit.rb b/lib/ratelimit.rb index b5da6ec..270065b 100644 --- a/lib/ratelimit.rb +++ b/lib/ratelimit.rb @@ -97,6 +97,7 @@ def within_bounds?(subject, options = {}) # @example Send an email as long as we haven't send 5 in the last 10 minutes # ratelimit.exec_with_threshold(email, [:threshold => 5, :interval => 600]) do # send_another_email + # ratelimit.add(email) # end def exec_within_threshold(subject, options = {}, &block) options[:threshold] ||= 30