Class: Popularity::Facebook

Inherits:
Crawler
  • Object
show all
Defined in:
lib/popularity/networks/facebook.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

#commentsObject



9
10
11
# File 'lib/popularity/networks/facebook.rb', line 9

def comments
  response_json['comments'].to_f.to_i
end

#sharesObject



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

def shares
  response_json['shares'].to_f.to_i
end