lib/imdb/search.rb in ruby-imdb-0.7.0 vs lib/imdb/search.rb in ruby-imdb-0.7.1

- old
+ new

@@ -1,7 +1,7 @@ module IMDB - class Search + class Search < IMDB::Skeleton def self.movie(keyword) doc = Nokogiri::HTML(open("http://www.imdb.com/find?s=tt&q=#{CGI.escape(keyword)}")) ret_val = [] doc.search('a[@href^="/title/tt"]').reject { |node| ret_val.push(IMDB::Result.new(node["href"][/\d+/], node.content, "http://www.imdb.com#{node['href']}")) @@ -9,10 +9,10 @@ return ret_val end end # Search - class Result + class Result < IMDB::Skeleton attr_accessor :id, :title, :link, :year def initialize(id, title, link) @title = title @link = link