Method: Redis::Subscription#initialize

Defined in:
lib/redis/subscribe.rb

#initialize {|_self| ... } ⇒ Subscription

Returns a new instance of Subscription.

Yields:

  • (_self)

Yield Parameters:



58
59
60
61
62
63
64
# File 'lib/redis/subscribe.rb', line 58

def initialize
  @callbacks = Hash.new do |hash, key|
    hash[key] = ->(*_) {}
  end

  yield(self)
end