Sha256: 667c313624b45fb334c204246f80d3f729f55979c9c9e96176c104d7bd0394ef

Contents?: true

Size: 452 Bytes

Versions: 8

Compression:

Stored size: 452 Bytes

Contents

require 'botfly/matcher'

# Msg: body, chat_state, subject, type (:chat, :error, :groupchat, :headline, :normal), from, to
module Botfly
  class SubjectMatcher < Matcher
    def match(params)
      msg = params[:message]
      Botfly.logger.debug "MCH: Matching #{@condition.inspect} against #{msg.subject.inspect}"
      Botfly.logger.debug "RESULT: #{(msg.subject =~ @condition).inspect}"
      return msg.subject.node =~ @condition
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
botfly-0.3.6 lib/botfly/matcher/subject_matcher.rb
botfly-0.3.5 lib/botfly/matcher/subject_matcher.rb
botfly-0.3.4 lib/botfly/matcher/subject_matcher.rb
botfly-0.3.3 lib/botfly/matcher/subject_matcher.rb
botfly-0.3.2 lib/botfly/matcher/subject_matcher.rb
botfly-0.3.1 lib/botfly/matcher/subject_matcher.rb
botfly-0.3.0 lib/botfly/matcher/subject_matcher.rb
botfly-0.2.1 lib/botfly/matcher/subject_matcher.rb