Class: Yt::Models::DetailsSet
Overview
Encapsulates information about the content of a resource, for instance a video.
Instance Method Summary collapse
-
#duration ⇒ Integer
The duration of the resource (in seconds).
-
#initialize(options = {}) ⇒ DetailsSet
constructor
A new instance of DetailsSet.
Constructor Details
#initialize(options = {}) ⇒ DetailsSet
Returns a new instance of DetailsSet.
10 11 12 |
# File 'lib/yt/models/details_set.rb', line 10 def initialize( = {}) @data = [:data] end |
Instance Method Details
#duration ⇒ Integer
Returns the duration of the resource (in seconds).
15 16 17 |
# File 'lib/yt/models/details_set.rb', line 15 def duration @duration = to_seconds @data.fetch('duration', 0) end |