Class: Tako::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/tako/proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(shard_name, connection) ⇒ Proxy

Returns a new instance of Proxy.



6
7
8
9
# File 'lib/tako/proxy.rb', line 6

def initialize(shard_name, connection)
  @shard_name = shard_name
  @connection = connection
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



4
5
6
# File 'lib/tako/proxy.rb', line 4

def connection
  @connection
end

#shard_nameObject (readonly)

Returns the value of attribute shard_name.



3
4
5
# File 'lib/tako/proxy.rb', line 3

def shard_name
  @shard_name
end

Instance Method Details

#with_shardObject



11
12
13
14
15
# File 'lib/tako/proxy.rb', line 11

def with_shard
  Tako::ProxyStack.with_shard(self) do
    yield
  end
end