mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
bind method is not needed, so goodbye! <3 <3 <3
This commit is contained in:
@@ -65,7 +65,7 @@ module ActiveSupport
|
||||
end
|
||||
|
||||
def subscribe(pattern = nil, &block)
|
||||
@queue.bind(pattern).subscribe(&block)
|
||||
@queue.subscribe(pattern, &block)
|
||||
end
|
||||
|
||||
def unsubscribe(subscriber)
|
||||
|
||||
@@ -6,15 +6,9 @@ module ActiveSupport
|
||||
def initialize
|
||||
@subscribers = []
|
||||
@listeners_for = {}
|
||||
@pattern = nil
|
||||
end
|
||||
|
||||
def bind(pattern)
|
||||
@pattern = pattern
|
||||
self
|
||||
end
|
||||
|
||||
def subscribe(pattern = @pattern, &block)
|
||||
def subscribe(pattern = nil, &block)
|
||||
@listeners_for.clear
|
||||
@subscribers << Subscriber.new(pattern, &block)
|
||||
@subscribers.last
|
||||
|
||||
Reference in New Issue
Block a user