Module: SF6::Limiter

Extended by:
Base
Defined in:
lib/sf6.rb

Class Method Summary collapse

Methods included from Base

reset!

Class Method Details

.check(attr, value, bucket, &blk) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/sf6.rb', line 42

def self.check(attr, value, bucket, &blk)
  timestamp = stamp(attr, bucket)
  increment(attr, timestamp)
  test(attr, value) do
    yield
  end
end