[](key)
click to toggle source
def [](key)
load_for_read!
super(key.to_s)
end
[]=(key, value)
click to toggle source
def []=(key, value)
load_for_write!
super(key.to_s, value)
end
clear()
click to toggle source
def clear
load_for_write!
super
end
delete(key)
click to toggle source
def delete(key)
load_for_write!
super(key.to_s)
end
destroy()
click to toggle source
def destroy
clear
@by.send(:destroy, @env) if @by
@env[ENV_SESSION_OPTIONS_KEY][:id] = nil if @env && @env[ENV_SESSION_OPTIONS_KEY]
@loaded = false
end
exists?()
click to toggle source
def exists?
return @exists if instance_variable_defined?(:@exists)
@exists = @by.send(:exists?, @env)
end
has_key?(key)
click to toggle source
def has_key?(key)
load_for_read!
super(key.to_s)
end
inspect()
click to toggle source
def inspect
load_for_read!
super
end
loaded?()
click to toggle source
to_hash()
click to toggle source
def to_hash
load_for_read!
h = {}.replace(self)
h.delete_if { |k,v| v.nil? }
h
end
update(hash)
click to toggle source
def update(hash)
load_for_write!
super(hash.stringify_keys)
end