lib/picky/internals/index/redis/string_hash.rb in picky-1.4.3 vs lib/picky/internals/index/redis/string_hash.rb in picky-1.5.0
- old
+ new
@@ -7,12 +7,13 @@
class StringHash < Basic
# Writes the hash into Redis.
#
def dump hash
+ redis = backend
hash.each_pair do |key, value|
- @backend.hset namespace, key, value
+ redis.hset namespace, key, value
end
end
# Get a collection.
#
@@ -21,10 +22,10 @@
end
# Get a single value.
#
def member sym
- @backend.hget namespace, sym
+ backend.hget namespace, sym
end
end
end
\ No newline at end of file