Module: Byebug::DisplayFunctions
- Defined in:
- lib/byebug/commands/display.rb
Instance Method Summary collapse
- #active_display_expressions? ⇒ Boolean
- #display_expression(exp) ⇒ Object
- #print_display_expressions ⇒ Object
Instance Method Details
#active_display_expressions? ⇒ Boolean
9 10 11 |
# File 'lib/byebug/commands/display.rb', line 9 def active_display_expressions? @state.display.select{|d| d[0]}.size > 0 end |
#display_expression(exp) ⇒ Object
5 6 7 |
# File 'lib/byebug/commands/display.rb', line 5 def display_expression(exp) print "%s = %s\n", exp, debug_silent_eval(exp).to_s end |
#print_display_expressions ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/byebug/commands/display.rb', line 13 def print_display_expressions n = 1 for d in @state.display if d[0] print "%d: ", n display_expression(d[1]) end n += 1 end end |