Class: Async::Redis::Context::Subscribe

Inherits:
Nested
  • Object
show all
Defined in:
lib/async/redis/context/subscribe.rb

Instance Method Summary collapse

Methods inherited from Nested

#call, #close

Constructor Details

#initialize(pool, channels) ⇒ Subscribe

Returns a new instance of Subscribe.



30
31
32
33
34
35
36
# File 'lib/async/redis/context/subscribe.rb', line 30

def initialize(pool, channels)
  super(pool)
  
  @channels = channels
  
  subscribe(channels)
end

Instance Method Details

#listenObject



38
39
40
# File 'lib/async/redis/context/subscribe.rb', line 38

def listen
  return @connection.read_response
end