This class provides atomic $inc behaviour.
Sends the atomic $inc operation to the database.
@example Persist the new values.
inc.persist
@return [ Object ] The new numeric value.
@since 2.0.0
# File lib/mongoid/persistence/atomic/inc.rb, line 17 def persist prepare do current = document[field] || 0 document[field] = current + value execute("$inc") document[field] end end