Module: Moneta::Mixins::HashAdapter Private
- Included in:
- Adapters::LocalMemCache, Adapters::Memory
- Defined in:
- lib/moneta/mixins.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #clear(options = {}) ⇒ Object private
- #delete(key, options = {}) ⇒ Object private
- #initialize(options = {}) ⇒ Object private
- #key?(key, options = {}) ⇒ Boolean private
- #load(key, options = {}) ⇒ Object private
- #store(key, value, options = {}) ⇒ Object private
Instance Method Details
#clear(options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 62 |
# File 'lib/moneta/mixins.rb', line 59 def clear( = {}) @hash.clear self end |
#delete(key, options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
55 56 57 |
# File 'lib/moneta/mixins.rb', line 55 def delete(key, = {}) @hash.delete(key) end |
#initialize(options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
39 40 41 |
# File 'lib/moneta/mixins.rb', line 39 def initialize( = {}) @hash = {} end |
#key?(key, options = {}) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/moneta/mixins.rb', line 43 def key?(key, = {}) @hash.has_key?(key) end |
#load(key, options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 |
# File 'lib/moneta/mixins.rb', line 47 def load(key, = {}) @hash[key] end |
#store(key, value, options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/moneta/mixins.rb', line 51 def store(key, value, = {}) @hash[key] = value end |