Permalink
Browse files

bind method is not needed, so goodbye! <3 <3 <3

  • Loading branch information...
1 parent 3870366 commit 2cbef6996c41c785a626291ce29b934797359fd2 @tenderlove tenderlove committed Jul 18, 2010
@@ -65,7 +65,7 @@ def publish(*args)
end
def subscribe(pattern = nil, &block)
- @queue.bind(pattern).subscribe(&block)
+ @queue.subscribe(pattern, &block)
end
def unsubscribe(subscriber)
@@ -6,15 +6,9 @@ class Fanout
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

0 comments on commit 2cbef69

Please sign in to comment.