Class XhochY::Drossellog::EntryCounter
In: xhochy/drossellog/entrycounter.rb
Parent: PageCounter
PageCounter EntryCounter ImpressionCounter DataCounter LogFileParser WeeklyReport CodeCounter MonthlyReport LogLine DailyReport DailyIPCounter IPCounter ImpressionBlacklist Drossellog XhochY dot/f_1.png

Counts all requests that were done without a referrer and skips the blacklisted suffixes

Methods

add  

Public Instance methods

Count a URL, that has no referrer

If the suffix of the path is blacklisted, we won‘t add it

[Source]

    # File xhochy/drossellog/entrycounter.rb, line 13
13:       def add(page)
14:         
15:         if page.class == EntryCounter
16:           page.pages.each do |path, value|
17:             if @pages[path] == nil
18:               @pages[path] = value
19:             else
20:               @pages[path] += value
21:             end
22:           end
23:         end #^ EntryCounter
24:         
25:         if page.class == String
26:           if page.length > 1
27:             # remove trailing slash
28:             page = page.split(/\/$/)[0]
29:           end
30:        
31:           if ImpressionBlacklist::blacklisted? page
32:             return false
33:           end
34:  
35:           if @pages[page] != nil
36:             @pages[page] += 1
37:           else
38:             @pages[page] = 1
39:           end
40:         end #^ String
41:       end

[Validate]