Sha256: 008f9b54b7f96ac1ef59bd0ef29c6f0e8ea4f47003a4b10ede65075e7754822b

Contents?: true

Size: 1023 Bytes

Versions: 9

Compression:

Stored size: 1023 Bytes

Contents

module Debase
  class Context
    def frame_locals(frame_no=0)
      result = {}
      binding = frame_binding(frame_no)
      locals = eval("local_variables", binding)
      locals.each {|local| result[local.to_s] = eval(local.to_s, binding)}
      result
    end  

    def frame_class(frame_no=0)
      frame_self(frame_no).class
    end

    def frame_args_info(frame_no=0)
      nil
    end

    def handler
      Debase.handler or raise "No interface loaded"
    end

    def at_breakpoint(breakpoint)
      handler.at_breakpoint(self, breakpoint)
    end

    def at_catchpoint(excpt)
      handler.at_catchpoint(self, excpt)
    end

    def at_tracing(file, line)
      @tracing_started = true if File.identical?(file, File.join(Debugger::INITIAL_DIR, Debugger::PROG_SCRIPT))
      handler.at_tracing(self, file, line) if @tracing_started
    end

    def at_line(file, line)
      handler.at_line(self, file, line)
    end

    def at_return(file, line)
      handler.at_return(self, file, line)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
debase-0.1.0 lib/debase/context.rb
debase-0.0.9 lib/debase/context.rb
debase-0.0.8 lib/debase/context.rb
debase-0.0.7 lib/debase/context.rb
debase-0.0.6 lib/debase/context.rb
debase-0.0.5 lib/debase/context.rb
debase-0.0.4 lib/debase/context.rb
debase-0.0.3 lib/debase/context.rb
debase-0.0.2 lib/debase/context.rb