class Undo::Storage::Redis
Attributes
redis[R]
Public Class Methods
new(redis, options = {})
click to toggle source
Calls superclass method
# File lib/undo/storage/redis.rb, line 7 def initialize(redis, options = {}) @redis = redis super options end
Public Instance Methods
delete(uuid, options = {})
click to toggle source
# File lib/undo/storage/redis.rb, line 23 def delete(uuid, options = {}) redis.del uuid end
fetch(uuid, options = {})
click to toggle source
# File lib/undo/storage/redis.rb, line 18 def fetch(uuid, options = {}) data = redis.get(uuid) or raise KeyError, "key #{uuid} not found" unpack data end
store(uuid, object, options = {})
click to toggle source
# File lib/undo/storage/redis.rb, line 12 def store(uuid, object, options = {}) redis.set uuid, pack(object), adapter_options(options) end