Class: Telegem::Types::MessageEntity
- Defined in:
- lib/api/types.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from BaseType
Instance Method Summary collapse
-
#initialize(data) ⇒ MessageEntity
constructor
A new instance of MessageEntity.
Methods inherited from BaseType
#method_missing, #respond_to_missing?
Constructor Details
#initialize(data) ⇒ MessageEntity
Returns a new instance of MessageEntity.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/api/types.rb', line 91 def initialize(data) super(data) @type = data['type'] @offset = data['offset'] @length = data['length'] @url = data['url'] @user = User.new(data['user']) if data['user'] @language = data['language'] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Telegem::Types::BaseType
Instance Attribute Details
#language ⇒ Object (readonly)
Returns the value of attribute language.
89 90 91 |
# File 'lib/api/types.rb', line 89 def language @language end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
89 90 91 |
# File 'lib/api/types.rb', line 89 def length @length end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
89 90 91 |
# File 'lib/api/types.rb', line 89 def offset @offset end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
89 90 91 |
# File 'lib/api/types.rb', line 89 def type @type end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
89 90 91 |
# File 'lib/api/types.rb', line 89 def url @url end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
89 90 91 |
# File 'lib/api/types.rb', line 89 def user @user end |