Class: TelegramBotApi::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/telegram_bot_api/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#chatObject (readonly)

Returns the value of attribute chat.



4
5
6
# File 'lib/telegram_bot_api/message.rb', line 4

def chat
  @chat
end

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'lib/telegram_bot_api/message.rb', line 4

def text
  @text
end