class Cognition::Message
Attributes
command[R]
metadata[R]
responder[R]
Public Class Methods
new(command, metadata = {})
click to toggle source
# File lib/cognition/message.rb, line 5 def initialize(command, metadata = {}) @command = command @metadata = metadata @responder = Cognition::Responder.new(metadata["callback_url"]) if metadata["callback_url"] end
Public Instance Methods
reply(text)
click to toggle source
# File lib/cognition/message.rb, line 11 def reply(text) return "No Callback URL provided" unless @responder @responder.reply(text) end