提交 fa73e777 编写于 作者: A Aaron Patterson

private method is not needed

上级 4226c937
......@@ -45,7 +45,7 @@ def initialize(pattern, &block)
def publish(*args)
return unless subscribed_to?(args.first)
push(*args)
@block.call(*args)
true
end
......@@ -58,19 +58,9 @@ def subscribed_to?(name)
end
def matches?(subscriber_or_name)
case subscriber_or_name
when String
self === subscriber_or_name ||
@pattern && @pattern === subscriber_or_name
when self
true
end
end
private
def push(*args)
@block.call(*args)
end
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册