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

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(options = {})
  @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, options = {})
  @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(options = {})
  @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.

Returns:

  • (Boolean)


43
44
45
# File 'lib/moneta/mixins.rb', line 43

def key?(key, options = {})
  @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, options = {})
  @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, options = {})
  @hash[key] = value
end