Class: RedisRing::NodeProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/redis_ring/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slave_rpc) ⇒ NodeProvider

Returns a new instance of NodeProvider.



7
8
9
# File 'lib/redis_ring/node.rb', line 7

def initialize(slave_rpc)
  @slave_rpc = slave_rpc
end

Instance Attribute Details

#slave_rpcObject (readonly)

Returns the value of attribute slave_rpc.



5
6
7
# File 'lib/redis_ring/node.rb', line 5

def slave_rpc
  @slave_rpc
end

Instance Method Details

#new(host, port) ⇒ Object



11
12
13
# File 'lib/redis_ring/node.rb', line 11

def new(host, port)
  Node.new(slave_rpc.connection(host, port), host, port)
end