Created
October 22, 2009 01:08
-
-
Save leomayleomay/215635 to your computer and use it in GitHub Desktop.
This file contains 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
class A | |
a = 1 | |
end | |
how could I get the value of a outside of class A? | |
A.send(:local_variables) | |
=> ["_"] | |
there's no local variables named a in the class A. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment