Class: Twitter::Media::VideoInfo

Inherits:
Base
  • Object
show all
Includes:
Memoizable
Defined in:
lib/twitter/media/video_info.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, display_uri_attr_reader, #initialize, object_attr_reader, predicate_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Attribute Details

#aspect_ratioArray<Integer] (readonly)

Returns Array<Integer].

Returns:

  • (Array<Integer])

    Array<Integer]



10
11
12
# File 'lib/twitter/media/video_info.rb', line 10

def aspect_ratio
  @aspect_ratio
end

#duration_millisInteger (readonly)

Returns:

  • (Integer)


13
14
15
# File 'lib/twitter/media/video_info.rb', line 13

def duration_millis
  @duration_millis
end

Instance Method Details

#variantsArray<Twitter::Variant>

Returns an array of video variants

Returns:



18
19
20
21
22
# File 'lib/twitter/media/video_info.rb', line 18

def variants
  @attrs.fetch(:variants, []).collect do |variant|
    Variant.new(variant)
  end
end