Module: RSpecTracer::Tracker::IOHooks::YAMLReads Private

Defined in:
lib/rspec_tracer/tracker/io_hooks/yaml.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Prepended onto YAML.singleton_class (Psych). Hooks the three load_file-family entry points; Psych’s internals eventually call File.read but YAML.load_file is the user-level API that .rspec-tracer filters target.

Instance Method Summary collapse

Instance Method Details

#load_file(path) ⇒ 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.



17
18
19
20
# File 'lib/rspec_tracer/tracker/io_hooks/yaml.rb', line 17

def load_file(path, ...)
  IOHooks.record(path) if Thread.current[BUCKET_KEY]
  super
end

#safe_load_file(path) ⇒ 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.



24
25
26
27
# File 'lib/rspec_tracer/tracker/io_hooks/yaml.rb', line 24

def safe_load_file(path, ...)
  IOHooks.record(path) if Thread.current[BUCKET_KEY]
  super
end

#unsafe_load_file(path) ⇒ 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.



31
32
33
34
# File 'lib/rspec_tracer/tracker/io_hooks/yaml.rb', line 31

def unsafe_load_file(path, ...)
  IOHooks.record(path) if Thread.current[BUCKET_KEY]
  super
end