Last active
June 5, 2016 12:05
-
-
Save codesword/bd0cea7a4d63d9178b58a77f5e558388 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 Person | |
@book = "Harry Porter" | |
def initialize | |
@book = "The Rails Way" | |
end | |
end | |
Person.instance_variable_get(:@book) #=> "Harry Porter" | |
Person.new.instance_variable_get(:@book) #=> "The Rails Way" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment