Skip to content

Commit

Permalink
Merge pull request #25 from cowlibob/cowlibob-patch-exec_within_thres…
Browse files Browse the repository at this point in the history
…hold-documentation

Fixed documentation
  • Loading branch information
ejfinneran committed Mar 23, 2017
2 parents d6db8f4 + 36b5116 commit 177b1bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ratelimit.rb
Expand Up @@ -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
Expand Down

0 comments on commit 177b1bf

Please sign in to comment.