Provides recursive constant lookup methods useful for constant stubbing. @api private
# File lib/rspec/mocks/stub_const.rb, line 11 def recursive_const_defined?(name) name.split('::').inject([Object, '']) do |(mod, full_name), name| yield(full_name, name) if block_given? && !mod.is_a?(Module) return false unless mod.const_defined?(name) [mod.const_get(name), [mod, name].join('::')] end end
Generated with the Darkfish Rdoc Generator 2.