Module: RedisHash::Counters
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/redis_hash/concerns/counters.rb
Instance Method Summary collapse
Instance Method Details
#decrement(field, by: 1) ⇒ Object
28 29 30 |
# File 'lib/redis_hash/concerns/counters.rb', line 28 def decrement(field, by: 1) increment_field_by(field, by, modifier: -1) end |
#increment(field, by: 1) ⇒ Object
24 25 26 |
# File 'lib/redis_hash/concerns/counters.rb', line 24 def increment(field, by: 1) increment_field_by(field, by) end |