Method: Lita::Robot#receive
- Defined in:
- lib/lita/robot.rb
#receive(message) ⇒ void
This method returns an undefined value.
The primary entry point from the adapter for an incoming message. Dispatches the message to all registered handlers.
65 66 67 68 69 70 71 72 73 |
# File 'lib/lita/robot.rb', line 65 def receive() matched = handlers.map do |handler| next unless handler.respond_to?(:dispatch) handler.dispatch(self, ) end.any? trigger(:unhandled_message, message: ) unless matched end |