Class: Botfly::NickMatcher

Inherits:
Matcher
  • Object
show all
Defined in:
lib/botfly/matcher/nick_matcher.rb

Instance Method Summary collapse

Methods inherited from Matcher

#initialize

Constructor Details

This class inherits a constructor from Botfly::Matcher

Instance Method Details

#match(params) ⇒ Object



6
7
8
9
10
11
# File 'lib/botfly/matcher/nick_matcher.rb', line 6

def match(params)
  msg = params[:message]
  Botfly.logger.debug "MCH: Matching #{@condition.inspect} against #{msg.from.inspect}"
  Botfly.logger.debug "RESULT: #{(msg.from.node =~ @condition).inspect}"
  return msg.from.node =~ @condition
end