Class: Aikido::Zen::Collector::Events::TrackScan Private
- Inherits:
-
Aikido::Zen::Collector::Event
- Object
- Aikido::Zen::Collector::Event
- Aikido::Zen::Collector::Events::TrackScan
- 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, duration, has_errors:) ⇒ TrackScan
constructor
private
A new instance of TrackScan.
- #inspect ⇒ Object private
Methods inherited from Aikido::Zen::Collector::Event
Constructor Details
#initialize(sink_name, duration, has_errors:) ⇒ TrackScan
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 TrackScan.
165 166 167 168 169 170 |
# File 'lib/aikido/zen/collector/event.rb', line 165 def initialize(sink_name, duration, has_errors:) super() @sink_name = sink_name @duration = duration @has_errors = has_errors 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.
157 158 159 160 161 162 163 |
# File 'lib/aikido/zen/collector/event.rb', line 157 def self.from_json(data) new( data[:sink_name], data[:duration], has_errors: data[:has_errors] ) 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.
172 173 174 175 176 177 178 |
# File 'lib/aikido/zen/collector/event.rb', line 172 def as_json super.update({ sink_name: @sink_name, duration: @duration, has_errors: @has_errors }) 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.
180 181 182 |
# File 'lib/aikido/zen/collector/event.rb', line 180 def handle(collector) collector.handle_track_scan(@sink_name, @duration, has_errors: @has_errors) 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.
184 185 186 |
# File 'lib/aikido/zen/collector/event.rb', line 184 def inspect "#<#{self.class.name} #{@sink_name} #{format "%0.6f", @duration} #{@has_errors}>" end |