class Siberite::Client::Namespace
Public Class Methods
new(namespace, client)
click to toggle source
Calls superclass method
# File lib/siberite/client/namespace.rb, line 4 def initialize(namespace, client) @namespace = namespace @matcher = /\A#{Regexp.escape(@namespace)}:(.+)/ super(client) end
Public Instance Methods
available_queues()
click to toggle source
# File lib/siberite/client/namespace.rb, line 14 def available_queues client.available_queues.map {|q| in_namespace(q) }.compact end
in_namespace(key)
click to toggle source
# File lib/siberite/client/namespace.rb, line 18 def in_namespace(key) if match = @matcher.match(key) match[1] end end
namespace(key)
click to toggle source
# File lib/siberite/client/namespace.rb, line 24 def namespace(key) "#{@namespace}:#{key}" end