Class: PageRankr::Ranks::Compete
- Inherits:
-
Object
- Object
- PageRankr::Ranks::Compete
- Includes:
- PageRankr::Rank
- Defined in:
- lib/page_rankr/ranks/compete.rb
Instance Attribute Summary
Attributes included from PageRankr::Rank
Instance Method Summary collapse
Methods included from PageRankr::Rank
Instance Method Details
#clean(rank) ⇒ Object
18 19 20 |
# File 'lib/page_rankr/ranks/compete.rb', line 18 def clean(rank) rank.to_s.gsub(',', '').to_i end |
#request ⇒ Object
14 15 16 |
# File 'lib/page_rankr/ranks/compete.rb', line 14 def request @request ||= Typhoeus::Request.new("http://siteanalytics.compete.com/#{CGI.escape(@site.domain)}/") end |
#xpath ⇒ Object
10 11 12 |
# File 'lib/page_rankr/ranks/compete.rb', line 10 def xpath "//div[@id='rank']/div[@class='number value']/text()" end |