mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
bind method is not needed, so goodbye! <3 <3 <3
This commit is contained in:
parent
3870366092
commit
2cbef6996c
2 changed files with 2 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue