Class: Telegem::Types::CallbackQuery

Inherits:
BaseType
  • Object
show all
Defined in:
lib/api/types.rb

Instance Attribute Summary collapse

Attributes inherited from BaseType

#_raw_data

Instance Method Summary collapse

Methods inherited from BaseType

#method_missing, #respond_to_missing?

Constructor Details

#initialize(data) ⇒ CallbackQuery

Returns a new instance of CallbackQuery.



167
168
169
170
171
172
173
174
175
# File 'lib/api/types.rb', line 167

def initialize(data)
  super(data)
  
  @id = data['id']
  @from = User.new(data['from']) if data['from']
  @message = Message.new(data['message']) if data['message']
  @data = data['data']
  @chat_instance = data['chat_instance']
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Telegem::Types::BaseType

Instance Attribute Details

#chat_instanceObject (readonly)

Returns the value of attribute chat_instance.



165
166
167
# File 'lib/api/types.rb', line 165

def chat_instance
  @chat_instance
end

#dataObject (readonly)

Returns the value of attribute data.



165
166
167
# File 'lib/api/types.rb', line 165

def data
  @data
end

#fromObject (readonly)

Returns the value of attribute from.



165
166
167
# File 'lib/api/types.rb', line 165

def from
  @from
end

#idObject (readonly)

Returns the value of attribute id.



165
166
167
# File 'lib/api/types.rb', line 165

def id
  @id
end

#messageObject (readonly)

Returns the value of attribute message.



165
166
167
# File 'lib/api/types.rb', line 165

def message
  @message
end