Parent

Class/Module Index [+]

Quicksearch

Vizi::VisitList

This class creates and manages a list to keep track of the visits that are in process (cached) Once a visit reaches the time interval, an output transaction is generated and the visit is removed from the list

Public Class Methods

new() click to toggle source
# File lib/vizi/vizi_tracker.rb, line 328
def initialize

  @visits = Array.new

end

Public Instance Methods

append(visit) click to toggle source
# File lib/vizi/vizi_tracker.rb, line 332
def append(visit)

  @visits.push(visit)

  self

end
delete(visit) click to toggle source
# File lib/vizi/vizi_tracker.rb, line 337
def delete(visit)

  @visits.delete(visit)

end
find_all() click to toggle source
# File lib/vizi/vizi_tracker.rb, line 341
def find_all

  @visits

end
find_by_ip(ip) click to toggle source
# File lib/vizi/vizi_tracker.rb, line 345
def find_by_ip(ip)

  @visits.find { |visit| ip == visit.ip }

end
find_expired(test_dt) click to toggle source
# File lib/vizi/vizi_tracker.rb, line 349
def find_expired(test_dt)

  @visits.find { |visit| visit.expire_dt < test_dt }

end

[Validate]

Generated with the Darkfish Rdoc Generator 2.