# File lib/ohai/mixin/constant_helper.rb, line 33 def recursive_remove_constants(object) if object.respond_to?(:constants) object.constants.each do |const| next unless strict_const_defined?(object, const) recursive_remove_constants(object.const_get(const)) object.send(:remove_const, const) end end end
# File lib/ohai/mixin/constant_helper.rb, line 24 def remove_constants new_object_constants = Object.constants - @object_pristine.constants new_object_constants.each do |constant| Object.send(:remove_const, constant) unless Object.const_get(constant).is_a?(Module) end recursive_remove_constants(Ohai::NamedPlugin) end
Generated with the Darkfish Rdoc Generator 2.