Class: Minuteman::Counter
- Inherits:
-
Model
- Object
- Ohm::Model
- Model
- Minuteman::Counter
show all
- Defined in:
- lib/minuteman/counter.rb
Direct Known Subclasses
User
Defined Under Namespace
Classes: User
Instance Method Summary
collapse
Methods inherited from Model
create, find, find_or_create, #key
Instance Method Details
#count ⇒ Object
17
18
19
|
# File 'lib/minuteman/counter.rb', line 17
def count
Minuteman.config.redis.call("GET", key).to_i
end
|
#incr ⇒ Object
13
14
15
|
# File 'lib/minuteman/counter.rb', line 13
def incr
Minuteman.config.redis.call("INCR", key)
end
|