Files

Class/Module Index [+]

Quicksearch

Moneta::IncrementSupport

@api private

Public Class Methods

included(base) click to toggle source
# File lib/moneta/mixins.rb, line 231
def self.included(base)
  base.supports(:increment) if base.respond_to?(:supports)
end

Public Instance Methods

increment(key, amount = 1, options = {}) click to toggle source

(see Defaults#increment)

# File lib/moneta/mixins.rb, line 225
def increment(key, amount = 1, options = {})
  value = Utils.to_int(load(key, options)) + amount
  store(key, value.to_s, options)
  value
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.