Module: Popularity

Defined in:
lib/popularity.rb,
lib/popularity.rb,
lib/popularity/search.rb,
lib/popularity/crawler.rb,
lib/popularity/version.rb,
lib/popularity/rubygems.rb,
lib/popularity/networks/github.rb,
lib/popularity/networks/medium.rb,
lib/popularity/networks/facebook.rb,
lib/popularity/networks/rubygems.rb,
lib/popularity/results_container.rb,
lib/popularity/networks/pinterest.rb,
lib/popularity/networks/soundcloud.rb,
lib/popularity/networks/google_plus.rb,
lib/popularity/networks/reddit_post.rb,
lib/popularity/networks/reddit_share.rb,
lib/popularity/networks/reddit_comment.rb

Defined Under Namespace

Modules: ContainerMethods Classes: Crawler, Facebook, Github, GooglePlus, Medium, MultiSearch, Pinterest, RedditComment, RedditPost, RedditResult, RedditShare, ResultsContainer, Rubygems, Search, Soundcloud

Constant Summary collapse

TYPES =
[]
VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.search(*urls) ⇒ Object



20
21
22
# File 'lib/popularity.rb', line 20

def self.search(*urls)
  MultiSearch.new(:urls => urls)
end

.select_types(url) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/popularity.rb', line 24

def self.select_types(url)
  # github.com stats only valid for github urls, etc
  selected_types = Popularity::TYPES.collect { |n|
    network = n.new(@url)
    network if network.valid?
  }.compact
end