Last active
August 29, 2015 14:12
-
-
Save kwstannard/c8b077086a7d152a69ab 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
[4] pry(main)> mod = Module.new | |
=> #<Module:0x007fa1ac93c650> | |
[5] pry(main)> mod::Foo = Class.new | |
=> #<Class:0x007fa1ae5ad7f8> | |
[6] pry(main)> mod::Foo | |
=> #<Class:0x007fa1ae5ad7f8> | |
[7] pry(main)> mod::Foo.parent | |
=> Object |
this is because:
mod::Foo.name
=> nil
And the .parent
method in activesupport does regex on the .name
to pull out the module name.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👊