lib/progressrus/store/redis.rb in progressrus-0.1.7 vs lib/progressrus/store/redis.rb in progressrus-0.1.8
- old
+ new
@@ -57,10 +57,14 @@
end
private
def key(scope)
- "#{prefix}:#{scope.join(":")}"
+ if prefix.respond_to?(:call)
+ prefix.call(scope)
+ else
+ "#{prefix}:#{scope.join(":")}"
+ end
end
def deserialize(value)
JSON.parse(value, symbolize_names: true).merge(persisted: true)
end