lib/bade/runtime/globals_tracker.rb
# Filteres caught constants by location prefixes and returns ones that should be removed.
#
# @return [Array<[Object, Symbol]>]
Filteres caught constants by location prefixes and returns ones that should be removed.
Filteres caught constants by location prefixes and returns ones that should be removed .
def _filtered_constants
        @caught_constants.select do |(obj, name)|
          next unless obj.const_defined?(name)
          begin
            location = obj.const_source_location(name)
          rescue ::ArgumentError
            next
          end
          next true if location.nil?
          path = location.first
          next false if $LOADED_FEATURES.include?(path)
          next true if constants_location_prefixes.nil?
          constants_location_prefixes&.any? { |prefix| path.start_with?(prefix) }
        end
      end
def _filtered_constants @caught_constants . select do | ( obj , name ) | next unless obj . const_defined? ( name ) begin location = obj . const_source_location ( name ) rescue :: ArgumentError next end next true if location . nil? path = location . first next false if $LOADED_FEATURES . include? ( path ) next true if constants_location_prefixes . nil? constants_location_prefixes &. any? { | prefix | path . start_with? ( prefix ) } end end
Filteres caught constants by location prefixes and returns ones that should be removed.
Filteres caught constants by location prefixes and returns ones that should be removed .
None
Array<[Object, Symbol