class Byebug::RibProcessor

Public Class Methods

start() click to toggle source
# File lib/rib/extra/byebug.rb, line 40
def self.start
  Byebug.start
  Setting[:autolist] = false
  Context.processor = self
  steps = caller.index{ |path| !path.start_with?(__FILE__) }
  Byebug.current_context.step_out(steps + 2, true)
end

Public Instance Methods

at_breakpoint(breakpoint) click to toggle source
# File lib/rib/extra/byebug.rb, line 60
def at_breakpoint(breakpoint)
  raise NotImplementedError
end
at_end() click to toggle source
# File lib/rib/extra/byebug.rb, line 56
def at_end
  resume_rib
end
at_line() click to toggle source
# File lib/rib/extra/byebug.rb, line 48
def at_line
  resume_rib
end
at_return(_return_value) click to toggle source
# File lib/rib/extra/byebug.rb, line 52
def at_return(_return_value)
  resume_rib
end
location() click to toggle source
# File lib/rib/extra/byebug.rb, line 64
def location
  context.location
end

Private Instance Methods

perform(action, args) click to toggle source
# File lib/rib/extra/byebug.rb, line 89
def perform action, args
  case action
  when :step
    context.step_into(*args, frame.pos)
  when :next
    context.step_over(*args, frame.pos)
  when :finish
    context.step_out(1)
  end
end
print_location() click to toggle source
resume_rib() click to toggle source
# File lib/rib/extra/byebug.rb, line 75
def resume_rib
  byebug_binding = frame._binding

  print_location

  action, *args = catch(:rib_byebug) do
    allowing_other_threads do
      Rib.anchor byebug_binding, :byebug => self
    end
  end

  perform(action, args)
end