Sha256: 92421caa0f93f16537331d0a4bb583d364993f592b5eb8a5602b7046fe269070
Contents?: true
Size: 410 Bytes
Versions: 1
Compression:
Stored size: 410 Bytes
Contents
module RedisUtils class Namespace < RedisUtils::Base class << self def instance super end def get(namespace) namespace.gsub!(":*", "") instance.scan_each(:match => "#{namespace}:*").to_a end def flush(namespace) instance.scan_each(:match => namespace).to_a.each do |key| instance.del(key) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redis_utils-0.0.1 | lib/redis_utils/namespace.rb |