Module: Debugger::VarFunctions

Included in:
VarConstantCommand, VarGlobalCommand, VarInstanceCommand, VarLocalCommand
Defined in:
lib/ruby-debug/commands/variables.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#var_consts(mod) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/ruby-debug/commands/variables.rb', line 10

def var_consts(mod)
  constants = mod.constants
  constants.sort!
  for c in constants
    print " %s => %s\n", c, mod.const_get(c)
  end
end

#var_list(ary, bind = @state.binding) ⇒ Object



3
4
5
6
7
8
# File 'lib/ruby-debug/commands/variables.rb', line 3

def var_list(ary, bind = @state.binding)
  ary.sort!
  for v in ary
    print "  %s => %s\n", v, debug_eval(v, bind).inspect
  end
end