Class: Video
Overview
This object represents a video file.
Extends Common2 class.
Instance Method Summary collapse
-
#duration ⇒ Object
Duration of the video in seconds as defined by sender.
-
#heigth ⇒ Object
Video height as defined by sender.
-
#initialize(obj) ⇒ Video
constructor
:nodoc:.
-
#thumb ⇒ Object
Optional
. -
#width ⇒ Object
Video width as defined by sender.
Methods inherited from Common2
#file_id, #file_size, #file_unique_id, #mime_type
Constructor Details
#initialize(obj) ⇒ Video
:nodoc:
11 12 13 |
# File 'lib/objects/video.rb', line 11 def initialize(obj) # :nodoc: super(obj) end |
Instance Method Details
#duration ⇒ Object
Duration of the video in seconds as defined by sender.
26 27 28 |
# File 'lib/objects/video.rb', line 26 def duration @obj.duration end |
#heigth ⇒ Object
Video height as defined by sender.
21 22 23 |
# File 'lib/objects/video.rb', line 21 def heigth @obj.heigth end |
#thumb ⇒ Object
Optional
. Video thumbnail.
31 32 33 34 35 36 |
# File 'lib/objects/video.rb', line 31 def thumb data = @obj.thumb return false unless data PhotoSize.new(data) end |
#width ⇒ Object
Video width as defined by sender.
16 17 18 |
# File 'lib/objects/video.rb', line 16 def width @obj.width end |