Sha256: 9041bc841d80aef1f56e61fe12039328214aa44ee6dd4ddcfe540b97aee74ae5
Contents?: true
Size: 282 Bytes
Versions: 3
Compression:
Stored size: 282 Bytes
Contents
# frozen_string_literal: true module Kredis::Namespace def namespace=(namespace) Thread.current[:kredis_namespace] = namespace end def namespace Thread.current[:kredis_namespace] end def namespaced_key(key) namespace ? "#{namespace}:#{key}" : key end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kredis-1.7.0 | lib/kredis/namespace.rb |
kredis-1.6.1 | lib/kredis/namespace.rb |
kredis-1.6.0 | lib/kredis/namespace.rb |