Class: Moneta::Adapters::Null
- Inherits:
-
Object
- Object
- Moneta::Adapters::Null
- Includes:
- Defaults
- Defined in:
- lib/moneta/adapters/null.rb
Overview
Null backend which doesn’t store anything
Instance Method Summary collapse
-
#clear(options = {}) ⇒ void
Clear all keys in this store.
-
#delete(key, options = {}) ⇒ Object
Delete the key from the store and return the current value.
-
#initialize(options = {}) ⇒ Null
constructor
A new instance of Null.
-
#key?(key, options = {}) ⇒ Boolean
Exists the value with key.
-
#load(key, options = {}) ⇒ Object
Fetch value with key.
-
#store(key, value, options = {}) ⇒ Object
Store value with key.
Methods included from Defaults
#[], #[]=, #close, #create, #decrement, #each_key, #features, #fetch, #fetch_values, included, #increment, #merge!, #slice, #supports?, #update, #values_at
Methods included from OptionSupport
#expires, #prefix, #raw, #with
Constructor Details
#initialize(options = {}) ⇒ Null
Returns a new instance of Null.
9 |
# File 'lib/moneta/adapters/null.rb', line 9 def initialize( = {}); end |
Instance Method Details
#clear(options = {}) ⇒ void
This method returns an undefined value.
Clear all keys in this store
32 33 34 |
# File 'lib/moneta/adapters/null.rb', line 32 def clear( = {}) self end |
#delete(key, options = {}) ⇒ Object
Delete the key from the store and return the current value
27 28 29 |
# File 'lib/moneta/adapters/null.rb', line 27 def delete(key, = {}) nil end |
#key?(key, options = {}) ⇒ Boolean
Exists the value with key
12 13 14 |
# File 'lib/moneta/adapters/null.rb', line 12 def key?(key, = {}) false end |
#load(key, options = {}) ⇒ Object
Fetch value with key. Return nil if the key doesn’t exist
17 18 19 |
# File 'lib/moneta/adapters/null.rb', line 17 def load(key, = {}) nil end |
#store(key, value, options = {}) ⇒ Object
Store value with key
22 23 24 |
# File 'lib/moneta/adapters/null.rb', line 22 def store(key, value, = {}) value end |