Class: Hackle::Event::Track

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:, event_type:, value: nil) ⇒ Track

Returns a new instance of Track.



21
22
23
24
25
26
# File 'lib/hackle/events/event.rb', line 21

def initialize(user_id:, event_type:, value: nil)
  @timestamp = Event.generate_timestamp
  @user_id = user_id
  @event_type = event_type
  @value = value
end

Instance Attribute Details

#event_typeObject (readonly)

Returns the value of attribute event_type.



19
20
21
# File 'lib/hackle/events/event.rb', line 19

def event_type
  @event_type
end

#valueObject (readonly)

Returns the value of attribute value.



19
20
21
# File 'lib/hackle/events/event.rb', line 19

def value
  @value
end