Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

Commit

Permalink
Documented the limit_exceeded method in the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Posen committed May 5, 2015
1 parent fc932a7 commit 4895266
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -80,7 +80,7 @@ A limit group is a way of enforcing a cap over a set of limits with the guarante

**initialize(\*limits)**

Constructor for `TrafficJam::Limit` takes either an array or splat of limits.
Constructor for `TrafficJam::Limit` takes either an array or splat of limits or other limit groups.

**increment(amount = 1)**

Expand All @@ -98,6 +98,10 @@ Increment the limits by the given number. Raises `TrafficJam::LimitExceededError

Return whether incrementing by the given amount would exceed any limit. Does not change amount used.

**limit_exceeded(amount = 1)**

Return the first `TrafficJam::Limit` that would be exceeded by this amount or `nil` if incrementing would be safe.

**reset**

Sets limits to 0.
Expand Down

0 comments on commit 4895266

Please sign in to comment.