module TurboTestRubyRefinements::ClassVariableHash

Public Instance Methods

class_variable_hash() click to toggle source
# File lib/turbo_test_ruby_refinements/module/class_variable_hash.rb, line 6
def class_variable_hash
  class_variables.each_with_object({}) do |class_variable, memo|
    begin
      memo[class_variable] = class_variable_get(class_variable).object_id
    rescue StandardError
      # Autoloaded classes may list class variables, but can raise an exception when
      # trying to access them if the class is is not fully loaded (ie. when tracing code)
    end
  end
end