Class: Undo::Storage::Redis
- Inherits:
-
Object
- Object
- Undo::Storage::Redis
- Defined in:
- lib/undo/storage/redis.rb,
lib/undo/storage/redis/gemspec.rb
Defined Under Namespace
Modules: Gemspec
Instance Method Summary collapse
- #fetch(uuid) ⇒ Object
-
#initialize(redis, options = {}) ⇒ Redis
constructor
A new instance of Redis.
- #put(uuid, object) ⇒ Object
Constructor Details
Instance Method Details
#fetch(uuid) ⇒ Object
15 16 17 |
# File 'lib/undo/storage/redis.rb', line 15 def fetch(uuid) deserialize redis.get(uuid) end |
#put(uuid, object) ⇒ Object
11 12 13 |
# File 'lib/undo/storage/redis.rb', line 11 def put(uuid, object) redis.set uuid, serialize(object) end |