Sha256: 6eb1a2a9a9c9d573297c0c236a291c898a75537b7c8627615caa6440853c82ba
Contents?: true
Size: 425 Bytes
Versions: 8
Compression:
Stored size: 425 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
8 entries across 8 versions & 1 rubygems