Skip to content

Instantly share code, notes, and snippets.

@brentvatne
Created October 5, 2012 00:03
Show Gist options
  • Save brentvatne/3837238 to your computer and use it in GitHub Desktop.
Save brentvatne/3837238 to your computer and use it in GitHub Desktop.
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