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.
138 139 140 141 142 143 |
# File 'lib/aikido/zen/collector/event.rb', line 138 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.
130 131 132 133 134 135 136 |
# File 'lib/aikido/zen/collector/event.rb', line 130 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.
145 146 147 148 149 150 151 |
# File 'lib/aikido/zen/collector/event.rb', line 145 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.
153 154 155 |
# File 'lib/aikido/zen/collector/event.rb', line 153 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.
157 158 159 |
# File 'lib/aikido/zen/collector/event.rb', line 157 def inspect "#<#{self.class.name} #{@sink_name} #{format "%0.6f", @duration} #{@has_errors}>" end |