Class: Aikido::Zen::Collector::Events::TrackUserAgent Private

Inherits:
Aikido::Zen::Collector::Event show all
Defined in:
lib/aikido/zen/collector/event.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from Aikido::Zen::Collector::Event

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Aikido::Zen::Collector::Event

register

Constructor Details

#initialize(user_agent_keys) ⇒ TrackUserAgent

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TrackUserAgent.



78
79
80
81
# File 'lib/aikido/zen/collector/event.rb', line 78

def initialize(user_agent_keys)
  super()
  @user_agent_keys = user_agent_keys
end

Class Method Details

.from_json(data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



74
75
76
# File 'lib/aikido/zen/collector/event.rb', line 74

def self.from_json(data)
  new(data[:user_agent_keys])
end

Instance Method Details

#as_jsonObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



83
84
85
86
87
# File 'lib/aikido/zen/collector/event.rb', line 83

def as_json
  super.update({
    user_agent_keys: @user_agent_keys
  })
end

#handle(collector) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



89
90
91
# File 'lib/aikido/zen/collector/event.rb', line 89

def handle(collector)
  collector.handle_track_user_agent(@user_agent_keys)
end

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



93
94
95
# File 'lib/aikido/zen/collector/event.rb', line 93

def inspect
  "#<#{self.class.name} #{@user_agent_keys.inspect}>"
end