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

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



105
106
107
108
# File 'lib/aikido/zen/collector/event.rb', line 105

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



101
102
103
# File 'lib/aikido/zen/collector/event.rb', line 101

def self.from_json(data)
  new(data[:ip_list_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.



110
111
112
113
114
# File 'lib/aikido/zen/collector/event.rb', line 110

def as_json
  super.update({
    ip_list_keys: @ip_list_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.



116
117
118
# File 'lib/aikido/zen/collector/event.rb', line 116

def handle(collector)
  collector.handle_track_ip_list(@ip_list_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.



120
121
122
# File 'lib/aikido/zen/collector/event.rb', line 120

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