Class: Telegem::Types::CallbackQuery
- Defined in:
- lib/api/types.rb
Instance Attribute Summary collapse
-
#chat_instance ⇒ Object
readonly
Returns the value of attribute chat_instance.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Attributes inherited from BaseType
Instance Method Summary collapse
-
#initialize(data) ⇒ CallbackQuery
constructor
A new instance of CallbackQuery.
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.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_instance ⇒ Object (readonly)
Returns the value of attribute chat_instance.
165 166 167 |
# File 'lib/api/types.rb', line 165 def chat_instance @chat_instance end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
165 166 167 |
# File 'lib/api/types.rb', line 165 def data @data end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
165 166 167 |
# File 'lib/api/types.rb', line 165 def from @from end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
165 166 167 |
# File 'lib/api/types.rb', line 165 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
165 166 167 |
# File 'lib/api/types.rb', line 165 def end |