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, sink_kind, 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, sink_kind, 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.
166 167 168 169 170 171 172 |
# File 'lib/aikido/zen/collector/event.rb', line 166 def initialize(sink_name, sink_kind, duration, has_errors:) super() @sink_name = sink_name @sink_kind = sink_kind @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 164 |
# File 'lib/aikido/zen/collector/event.rb', line 157 def self.from_json(data) new( data["sink_name"], data["sink_kind"], 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.
174 175 176 177 178 179 180 181 |
# File 'lib/aikido/zen/collector/event.rb', line 174 def as_json super.update({ "sink_name" => @sink_name, "sink_kind" => @sink_kind, "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.
183 184 185 |
# File 'lib/aikido/zen/collector/event.rb', line 183 def handle(collector) collector.handle_track_scan(@sink_name, @sink_kind, @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.
187 188 189 |
# File 'lib/aikido/zen/collector/event.rb', line 187 def inspect "#<#{self.class.name} #{@sink_name} #{@sink_kind} #{format "%0.6f", @duration} #{@has_errors}>" end |