lib/film_snob.rb in film_snob-0.1.4 vs lib/film_snob.rb in film_snob-0.2.0
- old
+ new
@@ -8,26 +8,20 @@
def initialize(url)
@url = url
@video = FilmSnob::UrlToVideo.new(url).video
end
- def site
- complain_about_bad_urls!(:site)
- video.site
- end
-
- def id
- complain_about_bad_urls!(:id)
- video.id
- end
-
- def clean_url
- complain_about_bad_urls!(:clean_url)
- video.clean_url
- end
-
def watchable?
!video.nil?
+ end
+
+ def method_missing(m)
+ if [:site, :id, :clean_url, :title, :html].include?(m)
+ complain_about_bad_urls!(m)
+ video.send(m)
+ else
+ super
+ end
end
private
def complain_about_bad_urls!(method)