Class: Popularity::GooglePlus
- Defined in:
- lib/popularity/networks/google_plus.rb
Instance Attribute Summary
Attributes inherited from Crawler
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
#plus_ones ⇒ Object
5 6 7 8 |
# File 'lib/popularity/networks/google_plus.rb', line 5 def plus_ones matches = response.scan(/window.__SSR = {c\: (\d+.\d+E?\d+)/) matches.flatten.first.to_f.to_i end |