Class: Hackle::UserEvent::Exposure

Inherits:
Hackle::UserEvent show all
Defined in:
lib/hackle/events/user_event.rb

Instance Attribute Summary collapse

Attributes inherited from Hackle::UserEvent

#timestamp, #user

Instance Method Summary collapse

Methods inherited from Hackle::UserEvent

generate_timestamp

Constructor Details

#initialize(user:, experiment:, variation:) ⇒ Exposure

Returns a new instance of Exposure.

Parameters:



30
31
32
33
34
# File 'lib/hackle/events/user_event.rb', line 30

def initialize(user:, experiment:, variation:)
  super(user: user)
  @experiment = experiment
  @variation = variation
end

Instance Attribute Details

#experimentExperiment (readonly)

Returns:



25
26
27
# File 'lib/hackle/events/user_event.rb', line 25

def experiment
  @experiment
end

#variationObject (readonly)

Returns the value of attribute variation.



25
# File 'lib/hackle/events/user_event.rb', line 25

attr_reader :experiment, :variation