Topic: Google Pagerank ruby code with rails? Noob here

Hey Guys,

I am looking to find pagerank for a site. I found ruby code that gets the pagerank but for the life of me have no idea how to use it. I am a total noob to Ruby (migrating from PHP)

Here is the Google Pagerank ruby code: http://snippets.dzone.com/posts/show/3284

How would I go about implementing this into my rails app and call  the function?

Re: Google Pagerank ruby code with rails? Noob here

Save the snippet there as a file, lets say 'page_rank.rb'

Then call page_rank.rb from the console:

$ ruby page_rank.rb http://railsforum.com
5

Alternately, you could try to include the file inside of your Ruby project.
> Remove the last 3 lines of the file, as those are there for command line usage

Then where you want to use it, require the file then
rank = SEO::GooglePR.new(url).page_rank

Hope that helps.