Created
October 5, 2012 00:03
-
-
Save brentvatne/3837238 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 SomeClass | |
def some_method | |
some_var = "from some class" | |
yield | |
end | |
end | |
SomeClass.new.some_method do # |?| | |
puts ___.some_var | |
end | |
# Is it possible to get the value of some_var without modifying some_method or SomeClass? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment