Class: TMDBParty::Video
- Inherits:
-
Object
- Object
- TMDBParty::Video
- Defined in:
- lib/tmdb_party/video.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url) ⇒ Video
constructor
A new instance of Video.
Constructor Details
#initialize(url) ⇒ Video
5 6 7 |
# File 'lib/tmdb_party/video.rb', line 5 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/tmdb_party/video.rb', line 3 def url @url end |
Class Method Details
.parse(data) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tmdb_party/video.rb', line 9 def self.parse(data) return unless data if data.is_a?(Array) data.collect do |url| Video.new(url) end else Video.new(data) end end |