Class: FilmSnob::UrlToVideo

Inherits:
Object
  • Object
show all
Defined in:
lib/film_snob/url_to_video.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, options) ⇒ UrlToVideo

Returns a new instance of UrlToVideo.



9
10
11
12
# File 'lib/film_snob/url_to_video.rb', line 9

def initialize(url, options)
  @url = url
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/film_snob/url_to_video.rb', line 7

def options
  @options
end

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/film_snob/url_to_video.rb', line 7

def url
  @url
end

Instance Method Details

#videoObject



14
15
16
# File 'lib/film_snob/url_to_video.rb', line 14

def video
  site.nil? ? nil : site.new(url, options)
end