Class: Mixpanelable::Event
- Inherits:
-
Object
- Object
- Mixpanelable::Event
- Defined in:
- lib/mixpanelable/event.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(args) ⇒ Event
constructor
A new instance of Event.
- #properties ⇒ Object
Constructor Details
#initialize(args) ⇒ Event
5 6 7 8 9 10 |
# File 'lib/mixpanelable/event.rb', line 5 def initialize(args) @distinct_id = args[:distinct_id] @token = args[:token] @name = args[:name] @properties = args[:properties] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/mixpanelable/event.rb', line 3 def name @name end |
Instance Method Details
#properties ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/mixpanelable/event.rb', line 12 def properties { 'distinct_id' => @distinct_id, 'mp_name_tag' => @distinct_id, 'token' => @token }.merge(@properties) end |