Class: StatsigEvent
- Inherits:
-
Object
- Object
- StatsigEvent
- Defined in:
- lib/statsig_event.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#secondary_exposures ⇒ Object
Returns the value of attribute secondary_exposures.
-
#statsig_metadata ⇒ Object
Returns the value of attribute statsig_metadata.
-
#user ⇒ Object
Returns the value of attribute user.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(event_name) ⇒ StatsigEvent
constructor
A new instance of StatsigEvent.
- #serialize ⇒ Object
Constructor Details
#initialize(event_name) ⇒ StatsigEvent
Returns a new instance of StatsigEvent.
8 9 10 11 |
# File 'lib/statsig_event.rb', line 8 def initialize(event_name) @event_name = event_name @time = Time.now.to_f * 1000 end |
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata.
3 4 5 |
# File 'lib/statsig_event.rb', line 3 def @metadata end |
#secondary_exposures ⇒ Object
Returns the value of attribute secondary_exposures.
5 6 7 |
# File 'lib/statsig_event.rb', line 5 def secondary_exposures @secondary_exposures end |
#statsig_metadata ⇒ Object
Returns the value of attribute statsig_metadata.
4 5 6 |
# File 'lib/statsig_event.rb', line 4 def @statsig_metadata end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/statsig_event.rb', line 6 def user @user end |
#value ⇒ Object
Returns the value of attribute value.
2 3 4 |
# File 'lib/statsig_event.rb', line 2 def value @value end |
Instance Method Details
#serialize ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/statsig_event.rb', line 19 def serialize { 'eventName' => @event_name, 'metadata' => @metadata, 'value' => @value, 'user' => @user, 'time' => @time, 'statsigMetadata' => @statsig_metadata, 'secondaryExposures' => @secondary_exposures } end |