Class: Telegem::Types::MessageEntity

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) ⇒ 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

#languageObject (readonly)

Returns the value of attribute language.



89
90
91
# File 'lib/api/types.rb', line 89

def language
  @language
end

#lengthObject (readonly)

Returns the value of attribute length.



89
90
91
# File 'lib/api/types.rb', line 89

def length
  @length
end

#offsetObject (readonly)

Returns the value of attribute offset.



89
90
91
# File 'lib/api/types.rb', line 89

def offset
  @offset
end

#typeObject (readonly)

Returns the value of attribute type.



89
90
91
# File 'lib/api/types.rb', line 89

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



89
90
91
# File 'lib/api/types.rb', line 89

def url
  @url
end

#userObject (readonly)

Returns the value of attribute user.



89
90
91
# File 'lib/api/types.rb', line 89

def user
  @user
end