Class: Document

Inherits:
Common2 show all
Defined in:
lib/objects/document.rb

Overview

This object represents a general file (as opposed to Photo, Voice messages and Audio files).

Extend Common2 clas.

Instance Method Summary collapse

Methods inherited from Common2

#file_id, #file_size, #file_unique_id, #mime_type

Constructor Details

#initialize(obj) ⇒ Document

:nodoc:



12
13
14
# File 'lib/objects/document.rb', line 12

def initialize(obj) # :nodoc:
  super(obj)
end

Instance Method Details

#file_nameObject

Optional. Original filename as defined by sender.



17
18
19
# File 'lib/objects/document.rb', line 17

def file_name
  @obj.file_name
end

#thumbObject



21
22
23
24
25
26
# File 'lib/objects/document.rb', line 21

def thumb
  data = @obj.file_name
  return PhotoSize.new(data) if data

  false
end