1
0
Fork 0
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:
Aaron Patterson 2010-07-18 15:37:23 -07:00
parent 3870366092
commit 2cbef6996c
2 changed files with 2 additions and 8 deletions

View file

@ -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)

View file

@ -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