Class: AmplitudeAnalytics::BaseEvent
- Inherits:
-
EventOptions
- Object
- EventOptions
- AmplitudeAnalytics::BaseEvent
- Defined in:
- lib/amplitude/event.rb
Overview
BaseEvent
Constant Summary
Constants inherited from EventOptions
EventOptions::EVENT_KEY_MAPPING
Instance Attribute Summary
Attributes inherited from EventOptions
#adid, #android_id, #app_version, #carrier, #city, #country, #device_brand, #device_id, #device_manufacturer, #device_model, #dma, #event_id, #event_properties, #event_type, #group_properties, #groups, #idfa, #idfv, #ingestion_metadata, #insert_id, #ip, #language, #library, #location_lat, #location_lng, #os_name, #os_version, #partner_id, #platform, #price, #product_id, #quantity, #region, #retry, #revenue, #revenue_type, #session_id, #time, #user_id, #user_properties, #version_name
Instance Method Summary collapse
-
#initialize(event_type, **kwargs) ⇒ BaseEvent
constructor
A new instance of BaseEvent.
- #load_event_options(event_options) ⇒ Object
Methods inherited from EventOptions
#[], #[]=, #callback, #event_body, #include?, #to_s, #valid_object?, #valid_properties?, #verify_property
Constructor Details
#initialize(event_type, **kwargs) ⇒ BaseEvent
231 232 233 234 |
# File 'lib/amplitude/event.rb', line 231 def initialize(event_type, **kwargs) @event_type = event_type super(**kwargs) end |
Instance Method Details
#load_event_options(event_options) ⇒ Object
236 237 238 239 240 241 242 |
# File 'lib/amplitude/event.rb', line 236 def () return if .nil? EVENT_KEY_MAPPING.each_key do |key| self[key] = Marshal.load(Marshal.dump([key])) if .include?(key) end end |