Class: Binding

Inherits:
Object
  • Object
show all
Defined in:
lib/console_utils/core_ext/local_values.rb

Instance Method Summary collapse

Instance Method Details

#local_valuesObject

Returns a hash with symbol keys that maps local variable names to their corresponding values.


4
5
6
# File 'lib/console_utils/core_ext/local_values.rb', line 4

def local_values
  Hash[local_variables.map { |name| [name.to_s, local_variable_get(name)] }]
end