Class: Update

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Update

Returns a new instance of Update.



3
4
5
6
7
# File 'lib/telegramObjects.rb', line 3

def initialize json
  return if !json
  @update_id = json["update_id"]
  @message = Message.new json["message"]
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



2
3
4
# File 'lib/telegramObjects.rb', line 2

def message
  @message
end

#update_idObject

Returns the value of attribute update_id.



2
3
4
# File 'lib/telegramObjects.rb', line 2

def update_id
  @update_id
end