Class: Document
- Inherits:
-
Object
- Object
- Document
- Defined in:
- lib/telegramObjects.rb
Instance Attribute Summary collapse
-
#file_id ⇒ Object
Returns the value of attribute file_id.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#file_size ⇒ Object
Returns the value of attribute file_size.
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
-
#thumb ⇒ Object
Returns the value of attribute thumb.
Instance Method Summary collapse
-
#initialize(json) ⇒ Document
constructor
A new instance of Document.
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_id ⇒ Object
Returns the value of attribute file_id.
105 106 107 |
# File 'lib/telegramObjects.rb', line 105 def file_id @file_id end |
#file_name ⇒ Object
Returns the value of attribute file_name.
105 106 107 |
# File 'lib/telegramObjects.rb', line 105 def file_name @file_name end |
#file_size ⇒ Object
Returns the value of attribute file_size.
105 106 107 |
# File 'lib/telegramObjects.rb', line 105 def file_size @file_size end |
#mime_type ⇒ Object
Returns the value of attribute mime_type.
105 106 107 |
# File 'lib/telegramObjects.rb', line 105 def mime_type @mime_type end |
#thumb ⇒ Object
Returns the value of attribute thumb.
105 106 107 |
# File 'lib/telegramObjects.rb', line 105 def thumb @thumb end |