Class: Document

Inherits:
Object
  • Object
show all
Defined in:
lib/telegramObjects.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Document

Returns a new instance of Document.



106
107
108
109
110
111
112
113
# File 'lib/telegramObjects.rb', line 106

def initialize json
  return if !json
  @file_id = json["file_id"]
  @thumb = PhotoSize.new json["thumb"]
  @file_name = json["file_name"]
  @mime_type = json["mime_type"]
  @file_size = json["file_size"]
end

Instance Attribute Details

#file_idObject

Returns the value of attribute file_id.



105
106
107
# File 'lib/telegramObjects.rb', line 105

def file_id
  @file_id
end

#file_nameObject

Returns the value of attribute file_name.



105
106
107
# File 'lib/telegramObjects.rb', line 105

def file_name
  @file_name
end

#file_sizeObject

Returns the value of attribute file_size.



105
106
107
# File 'lib/telegramObjects.rb', line 105

def file_size
  @file_size
end

#mime_typeObject

Returns the value of attribute mime_type.



105
106
107
# File 'lib/telegramObjects.rb', line 105

def mime_type
  @mime_type
end

#thumbObject

Returns the value of attribute thumb.



105
106
107
# File 'lib/telegramObjects.rb', line 105

def thumb
  @thumb
end