Class: Aikido::Zen::Collector::Events::TrackAttack Private
- Inherits:
-
Aikido::Zen::Collector::Event
- Object
- Aikido::Zen::Collector::Event
- Aikido::Zen::Collector::Events::TrackAttack
- 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
Class Method Summary collapse
- .from_json(data) ⇒ Object private
Instance Method Summary collapse
- #as_json ⇒ Object private
- #handle(collector) ⇒ Object private
-
#initialize(sink_name, being_blocked:) ⇒ TrackAttack
constructor
private
A new instance of TrackAttack.
- #inspect ⇒ Object private
Methods inherited from Aikido::Zen::Collector::Event
Constructor Details
#initialize(sink_name, being_blocked:) ⇒ TrackAttack
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 TrackAttack.
199 200 201 202 203 |
# File 'lib/aikido/zen/collector/event.rb', line 199 def initialize(sink_name, being_blocked:) super() @sink_name = sink_name @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.
192 193 194 195 196 197 |
# File 'lib/aikido/zen/collector/event.rb', line 192 def self.from_json(data) new( data[:sink_name], being_blocked: data[:being_blocked] ) end |
Instance Method Details
#as_json ⇒ 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.
205 206 207 208 209 210 |
# File 'lib/aikido/zen/collector/event.rb', line 205 def as_json super.update({ sink_name: @sink_name, 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.
212 213 214 |
# File 'lib/aikido/zen/collector/event.rb', line 212 def handle(collector) collector.handle_track_attack(@sink_name, being_blocked: @being_blocked) end |
#inspect ⇒ 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.
216 217 218 |
# File 'lib/aikido/zen/collector/event.rb', line 216 def inspect "#<#{self.class.name} #{@sink_name} #{@being_blocked}>" end |