Module: Siding::LoadManifest::LoadProbe
- Defined in:
- lib/siding/load_manifest.rb
Overview
Watches Kernel#load for the duration of a boot.
$LOADED_FEATURES only knows about require. Rails runs config/initializers/*.rb and
config/routes.rb through load, precisely so they can be re-run, and those files are
therefore invisible to a manifest built from the feature list alone -- an initializer could
be edited all day without the tool noticing. Observing the interpreter is the same answer the
rest of this class gives: what the boot actually loaded is what gets watched.
Defined Under Namespace
Modules: Interceptor
Class Method Summary collapse
Class Method Details
.finish ⇒ Object
299 300 301 302 |
# File 'lib/siding/load_manifest.rb', line 299 def finish stop @paths end |
.note(path) ⇒ Object
304 305 306 307 308 309 310 311 |
# File 'lib/siding/load_manifest.rb', line 304 def note(path) return unless @recording return unless path.is_a?(String) || path.respond_to?(:to_path) @paths << File.(path.to_s) rescue StandardError nil end |
.start ⇒ Object
287 288 289 290 291 292 |
# File 'lib/siding/load_manifest.rb', line 287 def start install @paths = [] @recording = true self end |
.stop ⇒ Object
294 295 296 297 |
# File 'lib/siding/load_manifest.rb', line 294 def stop @recording = false self end |