Created
July 24, 2008 02:31
-
-
Save engineyard/2010 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exists: | |
Foo | |
Foo::Bar | |
Foo::Bar::Baz | |
Foo::Baz::Bat | |
Foo::Baz::Bat::Bam | |
Examples: | |
Foo.full_const_get("Bar") #=> Foo::Bar | |
Foo::Baz.full_const_get("Bar::Baz") #=> Foo::Bar::Baz | |
Foo::Baz::Bat.full_const_get("Bar::Baz") #=> Foo::Bar::Baz | |
Algorithm: | |
do regular const_get, then do the rigid const_get from Merb. Failing that, try to do the rigid const_get for the first two, etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment