Class: Bot::Message::Text
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(to, body, suggested_responses = false, options = {}) ⇒ Text
constructor
A new instance of Text.
Methods inherited from Base
Constructor Details
#initialize(to, body, suggested_responses = false, options = {}) ⇒ Text
Returns a new instance of Text.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/bot/messages/text.rb', line 4 def initialize(to, body, suggested_responses=false, ={}) self. = { 'type' => 'text', 'to' => to, 'body' => body, 'typeTime' => 0, }.merge() self.['chatId'] = ['chatId'] if ['chatId'] self.suggested_responses = suggested_responses end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Bot::Message::Base