Class: Bataille::Analytics

Inherits:
Object
  • Object
show all
Defined in:
lib/bataille/analytics.rb

Instance Method Summary collapse

Constructor Details

#initialize(search_result, site) ⇒ Analytics

Returns a new instance of Analytics.



4
5
6
7
# File 'lib/bataille/analytics.rb', line 4

def initialize(search_result, site)
  @search_result = search_result
  @site = site
end

Instance Method Details

#rateObject



9
10
11
# File 'lib/bataille/analytics.rb', line 9

def rate
  @search_result.detect { |x| x.url == @site.url }.rank
end