Method: Cash::Mock#incr
- Defined in:
- lib/cash/mock.rb
#incr(key, amount = 1) ⇒ Object
100 101 102 103 104 105 |
# File 'lib/cash/mock.rb', line 100 def incr(key, amount = 1) if self.has_unexpired_key?(key) self[key].increment(amount) self[key].to_i end end |