Class: Hackle::Event::Exposure

Inherits:
Hackle::Event show all
Defined in:
lib/hackle/events/event.rb

Instance Attribute Summary collapse

Attributes inherited from Hackle::Event

#timestamp, #user_id

Instance Method Summary collapse

Methods inherited from Hackle::Event

generate_timestamp

Constructor Details

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

Returns a new instance of Exposure.



10
11
12
13
14
15
# File 'lib/hackle/events/event.rb', line 10

def initialize(user_id:, experiment:, variation:)
  @timestamp = Event.generate_timestamp
  @user_id = user_id
  @experiment = experiment
  @variation = variation
end

Instance Attribute Details

#experimentObject (readonly)

Returns the value of attribute experiment.



8
9
10
# File 'lib/hackle/events/event.rb', line 8

def experiment
  @experiment
end

#variationObject (readonly)

Returns the value of attribute variation.



8
9
10
# File 'lib/hackle/events/event.rb', line 8

def variation
  @variation
end