Class: Kestrel::Client::Namespace

Inherits:
Proxy
  • Object
show all
Defined in:
lib/kestrel/client/namespace.rb

Instance Attribute Summary

Attributes inherited from Proxy

#client

Instance Method Summary collapse

Methods inherited from Proxy

#method_missing

Constructor Details

#initialize(namespace, client) ⇒ Namespace

Returns a new instance of Namespace.



4
5
6
7
# File 'lib/kestrel/client/namespace.rb', line 4

def initialize(namespace, client)
  @namespace = namespace
  super(client)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Kestrel::Client::Proxy

Instance Method Details

#get(key, *args) ⇒ Object



9
10
11
# File 'lib/kestrel/client/namespace.rb', line 9

def get(key, *args)
  client.get(namespace(key), *args)
end

#set(key, *args) ⇒ Object



13
14
15
# File 'lib/kestrel/client/namespace.rb', line 13

def set(key, *args)
  client.set(namespace(key), *args)
end