Method: Watsbot::Message#send
- Defined in:
- lib/watsbot/message.rb
#send(uid, message, context = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/watsbot/message.rb', line 8 def send(uid, , context={}) raise "uid should be provided" and return if uid.nil? or uid.empty? raise "message should be provided" and return if .nil? or .empty? future = Celluloid::Future.new { call(uid, , context={}) } future.value end |