Sha256: 2ae7fbc7dc82dd27164b204d21f50edfb1294d523fa85b295fa240424ad9effb
Contents?: true
Size: 439 Bytes
Versions: 2
Compression:
Stored size: 439 Bytes
Contents
require 'botfly/matcher' # Msg: body, chat_state, subject, type (:chat, :error, :groupchat, :headline, :normal) module Botfly class BodyMatcher < Matcher def match(params) msg = params[:message] Botfly.logger.debug " MCH: Matching #{@condition.inspect} against #{msg.body.inspect}" Botfly.logger.debug " RESULT: #{(msg.body =~ @condition).inspect}" return msg.body =~ @condition end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
botfly-0.1.1 | lib/botfly/matcher/body_matcher.rb |
botfly-0.1.0 | lib/botfly/matcher/body_matcher.rb |