class Moneta::Expiration

Public Class Methods

new(hash) click to toggle source
# File lib/moneta/lmc.rb, line 10
def initialize(hash)
  @hash = hash
end

Public Instance Methods

[](key) click to toggle source
# File lib/moneta/lmc.rb, line 14
def [](key)         @hash["#{key}__!__expiration"]          end
[]=(key, value) click to toggle source
# File lib/moneta/lmc.rb, line 15
def []=(key, value) @hash["#{key}__!__expiration"] = value  end
delete(key) click to toggle source
# File lib/moneta/lmc.rb, line 17
def delete(key)
  key = "#{key}__!__expiration"
  value = @hash[key]
  @hash.delete(key)
  value
end