Class: TelegramBotApi::Message
- Inherits:
-
Object
- Object
- TelegramBotApi::Message
- Defined in:
- lib/telegram_bot_api/message.rb
Instance Attribute Summary collapse
-
#chat ⇒ Object
readonly
Returns the value of attribute chat.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(payload) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(payload) ⇒ Message
Returns a new instance of Message.
6 7 8 9 |
# File 'lib/telegram_bot_api/message.rb', line 6 def initialize(payload) @text = payload["text"] @chat = payload["chat"] end |
Instance Attribute Details
#chat ⇒ Object (readonly)
Returns the value of attribute chat.
4 5 6 |
# File 'lib/telegram_bot_api/message.rb', line 4 def chat @chat end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/telegram_bot_api/message.rb', line 4 def text @text end |