Method: Redis::Subscription#initialize

Defined in:
lib/redis/subscribe.rb

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

Returns a new instance of Subscription.

Yields:

  • (_self)

Yield Parameters:



51
52
53
54
55
56
57
# File 'lib/redis/subscribe.rb', line 51

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

  yield(self)
end