lib/rubo/listener.rb
# Determines if the listener likes the content of the message. If so, a
# Response built from the given Message is passed to the Listener callback.
#
# @param message [Message] A Message instance.
# @return [Boolean]
Determines if the listener likes the content of the message. If so, a
Response built from the given Message is passed to the Listener callback.
Determines if the listener likes the content of the message . If so a Response built from the given Message is passed to the Listener callback .
def call(message)
      if match = @matcher.call(message)
        if @regex
          @robot.logger.debug "Message '#{message}' matched regex /#{@regex}/"
        end
        @block.call(@robot.response.new(@robot, message, match))
        true
      else
        false
      end
    end
def call ( message ) if match = @matcher . call ( message ) if @regex @robot . logger . debug "Message '#{message}' matched regex /#{@regex}/" end @block . call ( @robot . response . new ( @robot , message , match ) ) true else false end end
Determines if the listener likes the content of the message.
Determines if the listener likes the content of the message .
None
Boolean
message
A Message instance.
A Message instance .