Class: Bataille::Analytics
- Inherits:
-
Object
- Object
- Bataille::Analytics
- Defined in:
- lib/bataille/analytics.rb
Instance Method Summary collapse
-
#initialize(search_result, site) ⇒ Analytics
constructor
A new instance of Analytics.
- #rate ⇒ Object
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
#rate ⇒ Object
9 10 11 |
# File 'lib/bataille/analytics.rb', line 9 def rate @search_result.detect { |x| x.url == @site.url }.rank end |