Class: RSpecTracer::Storage::JsonBackend::FieldReader Private
- Inherits:
-
Object
- Object
- RSpecTracer::Storage::JsonBackend::FieldReader
- Defined in:
- lib/rspec_tracer/storage/json_backend.rb
Overview
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.
Binds a backend + run directory so ‘LazySnapshot` readers call exactly one public entry point (`backend.read_field`). Keeping this as a nested class (not a Proc) so mutant can introspect the reader contract.
Instance Method Summary collapse
-
#initialize(backend:, dir:) ⇒ FieldReader
constructor
private
Internal method on the tracer pipeline.
-
#read(field) ⇒ Object
private
Internal method on the tracer pipeline.
Constructor Details
#initialize(backend:, dir:) ⇒ FieldReader
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.
Internal method on the tracer pipeline.
138 139 140 141 |
# File 'lib/rspec_tracer/storage/json_backend.rb', line 138 def initialize(backend:, dir:) @backend = backend @dir = dir end |
Instance Method Details
#read(field) ⇒ 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.
Internal method on the tracer pipeline.
145 146 147 |
# File 'lib/rspec_tracer/storage/json_backend.rb', line 145 def read(field) @backend.read_field(@dir, field) end |