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.
6 7 8 9 10 11 12 13 14 |
# File 'lib/statsig_event.rb', line 6 def initialize(event_name) @event_name = event_name @value = nil = nil @secondary_exposures = nil @user = nil @time = (Time.now.to_f * 1000).to_i = Statsig. end |
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata.
3 4 5 |
# File 'lib/statsig_event.rb', line 3 def end |
#secondary_exposures ⇒ Object
Returns the value of attribute secondary_exposures.
3 4 5 |
# File 'lib/statsig_event.rb', line 3 def secondary_exposures @secondary_exposures end |
#statsig_metadata ⇒ Object
Returns the value of attribute statsig_metadata.
3 4 5 |
# File 'lib/statsig_event.rb', line 3 def end |
#user ⇒ Object
Returns the value of attribute user.
4 5 6 |
# File 'lib/statsig_event.rb', line 4 def user @user end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/statsig_event.rb', line 3 def value @value end |
Instance Method Details
#serialize ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/statsig_event.rb', line 22 def serialize { :eventName => @event_name, :metadata => , :value => @value, :user => @user, :time => @time, :statsigMetadata => , :secondaryExposures => @secondary_exposures } end |