lib/page_rankr.rb in PageRankr-1.2.0 vs lib/page_rankr.rb in PageRankr-1.3.0

- old
+ new

@@ -1,29 +1,16 @@ -path = File.expand_path(File.dirname(__FILE__)) + '/page_rankr/' -require path + 'backlinks' -require path + 'alexa' -require path + 'google' +require File.join("page_rankr", "backlinks") +require File.join("page_rankr", "ranks") module PageRankr class << self def backlinks(site, *search_engines) - Backlinks.lookup site, *search_engines + Backlinks.new.lookup site, *search_engines end alias_method :backlink, :backlinks def ranks(site, *rank_trackers) - rank_trackers = [:google, :alexa] if rank_trackers.empty? - - ranks = {} - rank_trackers.each do |tracker| - case tracker - when :google - ranks[tracker] = Google.lookup(site) - when :alexa - ranks[tracker] = Alexa.lookup(site) - end - end - ranks + Ranks.new.lookup site, *rank_trackers end alias_method :rank, :ranks end end \ No newline at end of file