Class: Telegem::Types::Update
Instance Attribute Summary collapse
-
#callback_query ⇒ Object
readonly
Returns the value of attribute callback_query.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#update_id ⇒ Object
readonly
Returns the value of attribute update_id.
Attributes inherited from BaseType
Instance Method Summary collapse
-
#initialize(data) ⇒ Update
constructor
A new instance of Update.
Methods inherited from BaseType
#method_missing, #respond_to_missing?
Constructor Details
#initialize(data) ⇒ Update
Returns a new instance of Update.
181 182 183 184 185 186 187 |
# File 'lib/api/types.rb', line 181 def initialize(data) super(data) @update_id = data['update_id'] = Message.new(data['message']) if data['message'] @callback_query = CallbackQuery.new(data['callback_query']) if data['callback_query'] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Telegem::Types::BaseType
Instance Attribute Details
#callback_query ⇒ Object (readonly)
Returns the value of attribute callback_query.
179 180 181 |
# File 'lib/api/types.rb', line 179 def callback_query @callback_query end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
179 180 181 |
# File 'lib/api/types.rb', line 179 def end |
#update_id ⇒ Object (readonly)
Returns the value of attribute update_id.
179 180 181 |
# File 'lib/api/types.rb', line 179 def update_id @update_id end |