Class: Video

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

Overview

This object represents a video file.

Extends Common2 class.

Instance Method Summary collapse

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

#durationObject

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

#heigthObject

Video height as defined by sender.



21
22
23
# File 'lib/objects/video.rb', line 21

def heigth
  @obj.heigth
end

#thumbObject

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

#widthObject

Video width as defined by sender.



16
17
18
# File 'lib/objects/video.rb', line 16

def width
  @obj.width
end