class FilmSnob

Constants

MEDIA_METHODS
VERSION

Attributes

url[R]

Public Class Methods

new(url, options = {}) click to toggle source
# File lib/film_snob.rb, line 15
def initialize(url, options = {})
  @url = url
  @media = UrlToOembedProvider.new(url, options).media
end

Public Instance Methods

embeddable?() click to toggle source
# File lib/film_snob.rb, line 20
def embeddable?
  !@media.nil?
end

Private Instance Methods

media() click to toggle source
# File lib/film_snob.rb, line 26
def media
  if embeddable?
    @media
  else
    raise NotSupportedURLError, "#{url} is not a supported URL"
  end
end