Class: Popularity::Pinterest

Inherits:
Crawler
  • Object
show all
Defined in:
lib/popularity/networks/pinterest.rb

Instance Attribute Summary

Attributes inherited from Crawler

#url

Instance Method Summary collapse

Methods inherited from Crawler

#as_json, #async_done?, #fetch, #fetch_async, #has_response?, #host, #initialize, #name, property_names, #response, #response_json, stats, #total, #valid?

Constructor Details

This class inherits a constructor from Popularity::Crawler

Instance Method Details

#pinsObject



5
6
7
# File 'lib/popularity/networks/pinterest.rb', line 5

def pins
  JSON.parse(response.gsub('receiveCount(','').gsub(')',''))['count'].to_f.to_i
end