Class: Boffin::Hit
- Inherits:
-
Object
- Object
- Boffin::Hit
- Defined in:
- lib/boffin/hit.rb
Overview
Represents a Hit instance, immutable once created. Interacting with and instantiating Hit directly is not necessary.
Instance Method Summary collapse
-
#initialize(tracker, type, instance, opts = {}) ⇒ Hit
constructor
Creates a new Hit instance.
Constructor Details
#initialize(tracker, type, instance, opts = {}) ⇒ Hit
Creates a new Hit instance
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/boffin/hit.rb', line 19 def initialize(tracker, type, instance, opts = {}) uniquenesses = opts.delete(:unique) || [] @increment = opts.delete(:increment) || 1 @now = Time.now @sessid = Utils.uniquenesses_as_uid(uniquenesses) @type = type @tracker = tracker @instance = instance @member = Utils.object_as_member(@instance) store freeze end |