Class: Aikido::Zen::Collector::Events::TrackUser 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(actor) ⇒ TrackUser

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 TrackUser.



201
202
203
204
# File 'lib/aikido/zen/collector/event.rb', line 201

def initialize(actor)
  super()
  @actor = actor
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.



197
198
199
# File 'lib/aikido/zen/collector/event.rb', line 197

def self.from_json(data)
  new(Aikido::Zen::Actor.from_json(data[:actor]))
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.



206
207
208
209
210
# File 'lib/aikido/zen/collector/event.rb', line 206

def as_json
  super.update({
    actor: @actor.as_json
  })
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.



212
213
214
# File 'lib/aikido/zen/collector/event.rb', line 212

def handle(collector)
  collector.handle_track_user(@actor)
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.



216
217
218
# File 'lib/aikido/zen/collector/event.rb', line 216

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