lib/responder.rb
def listen(format, &block)
        matcher = @@parser.interpret(format)
        raise "Could not listen for '#{format}'" unless matcher
        @listeners[matcher] = block
      end
# Listen for a message and call the given block if it matches the format string.
#
# Raises an exception if the format string could not be parsed successfully.
Listen for a message and call the given block if it matches the format string.
Raises an exception if the format string could not be parsed successfully.
Listen for a message and call the given block if it matches the format string . Raises an exception if the format string could not be parsed successfully .
def listen(format, &block)
        matcher = @@parser.interpret(format)
        raise "Could not listen for '#{format}'" unless matcher
        @listeners[matcher] = block
      end
def listen ( format , & block ) matcher = @@parser . interpret ( format ) raise "Could not listen for '#{format}'" unless matcher @listeners [ matcher ] = block end
Listen for a message and call the given block if it matches the format string.
Listen for a message and call the given block if it matches the format string .
format
block