Flowdock
method

each_const

Importance_0
each_const(path, base = ::Object) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/optparse/version.rb, line 49
  def each_const(path, base = ::Object)
    path.split(/::|\//).inject(base) do |klass, name|
      raise NameError, path unless Module === klass
      klass.constants.grep(/#{name}/) do |c|
        klass.const_defined?(c) or next
        c = klass.const_get(c)
      end
    end
  end
Register or log in to add new notes.