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

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



134
135
136
137
# File 'lib/aikido/zen/collector/event.rb', line 134

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



128
129
130
131
132
# File 'lib/aikido/zen/collector/event.rb', line 128

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



139
140
141
142
143
# File 'lib/aikido/zen/collector/event.rb', line 139

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



145
146
147
# File 'lib/aikido/zen/collector/event.rb', line 145

def handle(collector)
  collector.handle_track_attack_wave(being_blocked: @being_blocked)
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.



149
150
151
# File 'lib/aikido/zen/collector/event.rb', line 149

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