Method: Moneta::Adapters::MongoMoped#delete
- Defined in:
- lib/moneta/adapters/mongo/moped.rb
#delete(key, options = {}) ⇒ Object
Delete the key from the store and return the current value
81 82 83 84 85 |
# File 'lib/moneta/adapters/mongo/moped.rb', line 81 def delete(key, = {}) value = load(key, ) @collection.find(_id: to_binary(key)).remove if value value end |