Permalink
Browse files

Callback#matching? now public

  • Loading branch information...
1 parent 5da2ee6 commit 7082ae048a5b41970a50d152fb1f8b8319d25499 @tbuehlmann committed Sep 7, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/ponder/callback.rb
View
@@ -15,12 +15,6 @@ def initialize(pattern = //, options = {}, proc = Proc.new {})
@options = options
end
- def call(event)
- @proc.call(event) if matching?(event)
- end
-
- private
-
def matching?(event)
if [:channel, :query].include? event[:type]
event[:message] =~ @pattern ? true : false
@@ -30,5 +24,9 @@ def matching?(event)
true
end
end
+
+ def call(event)
+ @proc.call(event) if matching?(event)
+ end
end
end

0 comments on commit 7082ae0

Please sign in to comment.