Method: Moneta::Adapters::Client#increment
- Defined in:
- lib/moneta/adapters/client.rb
#increment(key, amount = 1, options = {}) ⇒ Object
Note:
Not every Moneta store implements this method, a NotImplementedError is raised if it is not supported.
Atomically increment integer value with key
This method also accepts negative amounts.
48 49 50 51 |
# File 'lib/moneta/adapters/client.rb', line 48 def increment(key, amount = 1, = {}) write(:increment, key, amount, ) read_msg end |