Accept proc and array for redis namespace
parent
476c6045c4
commit
41b4abe0db
|
@ -17,7 +17,11 @@ module Flop
|
|||
private
|
||||
|
||||
def key(name)
|
||||
[@namespace, name].join(':')
|
||||
[namespace, name].flatten.join(':')
|
||||
end
|
||||
|
||||
def namespace
|
||||
@namespace.is_a?(Proc) ? @namespace.call : @namespace
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue