Listing Local Variables
Last updated
Was this helpful?
Last updated
Was this helpful?
In Ruby 2.2, the binding
object gives us access to a method #local_variables
which returns the symbol names of the binding's local variables. We can see this in action with
which results in