Flowdock
method

search_const

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: OptionParser
search_const(klass, name) 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 59
  def search_const(klass, name)
    klasses = [klass]
    while klass = klasses.shift
      klass.constants.each do |cname|
        klass.const_defined?(cname) or next
        const = klass.const_get(cname)
        yield klass, cname, const if name === cname
        klasses << const if Module === const and const != ::Object
      end
    end
  end
Register or log in to add new notes.