Class: RSpec::Hermetic::Probe::Constants

Inherits:
Base
  • Object
show all
Defined in:
lib/rspec/hermetic/probe/constants.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #name

Constructor Details

This class inherits a constructor from RSpec::Hermetic::Probe::Base

Instance Method Details

#capture(_context) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/rspec/hermetic/probe/constants.rb', line 10

def capture(_context)
  roots = constant_roots
  @seen = {}
  @entry_count = 0
  roots.each_with_object({}) do |(mod, prefix), values|
    capture_module(values, mod, prefix, @configuration.constants_max_depth)
  end
end