Class: Tako::Proxy
- Inherits:
-
Object
- Object
- Tako::Proxy
- Defined in:
- lib/tako/proxy.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#shard_name ⇒ Object
readonly
Returns the value of attribute shard_name.
Instance Method Summary collapse
-
#initialize(shard_name, connection) ⇒ Proxy
constructor
A new instance of Proxy.
- #with_shard ⇒ Object
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
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
4 5 6 |
# File 'lib/tako/proxy.rb', line 4 def connection @connection end |
#shard_name ⇒ Object (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_shard ⇒ Object
11 12 13 14 15 |
# File 'lib/tako/proxy.rb', line 11 def with_shard Tako::ProxyStack.with_shard(self) do yield end end |