Class: Kettle::Ndjson::EventRecorder
- Inherits:
-
Object
- Object
- Kettle::Ndjson::EventRecorder
- Defined in:
- lib/kettle/ndjson.rb,
sig/kettle/ndjson.rbs
Instance Attribute Summary collapse
-
#phase_timings ⇒ Array[Hash[Symbol, untyped]]
readonly
Returns the value of attribute phase_timings.
Instance Method Summary collapse
- #emit(payload) ⇒ void
-
#initialize(stream = nil, phase_timings = []) ⇒ EventRecorder
constructor
A new instance of EventRecorder.
- #record_phase_timing(payload) ⇒ void
Constructor Details
#initialize(stream = nil, phase_timings = []) ⇒ EventRecorder
Returns a new instance of EventRecorder.
147 148 149 150 |
# File 'lib/kettle/ndjson.rb', line 147 def initialize(stream = nil, phase_timings = []) @stream = stream @phase_timings = phase_timings end |
Instance Attribute Details
#phase_timings ⇒ Array[Hash[Symbol, untyped]] (readonly)
Returns the value of attribute phase_timings.
152 153 154 |
# File 'lib/kettle/ndjson.rb', line 152 def phase_timings @phase_timings end |
Instance Method Details
#emit(payload) ⇒ void
This method returns an undefined value.
154 155 156 |
# File 'lib/kettle/ndjson.rb', line 154 def emit(payload) @stream&.emit(payload) end |
#record_phase_timing(payload) ⇒ void
This method returns an undefined value.
158 159 160 |
# File 'lib/kettle/ndjson.rb', line 158 def record_phase_timing(payload) @phase_timings << Kettle::Ndjson.compact_payload(payload) end |