Class: HitRecord
- Inherits:
-
Object
- Object
- HitRecord
- Defined in:
- lib/HitRecord.rb
Overview
HitRecord.rb - ClickSpotter
Copyright © 2005, 2006 by Chris Schlaeger <[email protected]> This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.
$Id: HitRecord.rb 8 2006-01-22 15:19:51Z cs $
Instance Attribute Summary collapse
-
#bytes ⇒ Object
readonly
Returns the value of attribute bytes.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#entry ⇒ Object
Returns the value of attribute entry.
-
#exit ⇒ Object
Returns the value of attribute exit.
-
#page ⇒ Object
Returns the value of attribute page.
-
#referer ⇒ Object
Returns the value of attribute referer.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#timeStamp ⇒ Object
readonly
Returns the value of attribute timeStamp.
-
#visitor ⇒ Object
Returns the value of attribute visitor.
Instance Method Summary collapse
-
#initialize(rec) ⇒ HitRecord
constructor
A new instance of HitRecord.
- #to_s ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(rec) ⇒ HitRecord
Returns a new instance of HitRecord.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/HitRecord.rb', line 17 def initialize(rec) @uid = rec['uid'] @timeStamp = rec['timeStamp'] @request = rec['request'] @code = rec['code'] @bytes = rec['bytes'] @visitor = nil @page = nil @referer = nil @entry = false @exit = false end |
Instance Attribute Details
#bytes ⇒ Object (readonly)
Returns the value of attribute bytes.
14 15 16 |
# File 'lib/HitRecord.rb', line 14 def bytes @bytes end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
14 15 16 |
# File 'lib/HitRecord.rb', line 14 def code @code end |
#entry ⇒ Object
Returns the value of attribute entry.
15 16 17 |
# File 'lib/HitRecord.rb', line 15 def entry @entry end |
#exit ⇒ Object
Returns the value of attribute exit.
15 16 17 |
# File 'lib/HitRecord.rb', line 15 def exit @exit end |
#page ⇒ Object
Returns the value of attribute page.
15 16 17 |
# File 'lib/HitRecord.rb', line 15 def page @page end |
#referer ⇒ Object
Returns the value of attribute referer.
15 16 17 |
# File 'lib/HitRecord.rb', line 15 def referer @referer end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
14 15 16 |
# File 'lib/HitRecord.rb', line 14 def request @request end |
#timeStamp ⇒ Object (readonly)
Returns the value of attribute timeStamp.
14 15 16 |
# File 'lib/HitRecord.rb', line 14 def timeStamp @timeStamp end |
#visitor ⇒ Object
Returns the value of attribute visitor.
15 16 17 |
# File 'lib/HitRecord.rb', line 15 def visitor @visitor end |
Instance Method Details
#to_s ⇒ Object
30 31 32 |
# File 'lib/HitRecord.rb', line 30 def to_s puts "#{@timeStamp} Request: '#{@request}' Bytes: #{@bytes}" end |
#url ⇒ Object
34 35 36 |
# File 'lib/HitRecord.rb', line 34 def url return page.url end |