Flowdock
get_line(file, line) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/tracer.rb, line 99
  def get_line(file, line)
    if p = @get_line_procs[file]
      return p.call(line)
    end

    unless list = SCRIPT_LINES__[file]
      begin
        f = File::open(file)
        begin
          SCRIPT_LINES__[file] = list = f.readlines
        ensure
          f.close
        end
      rescue
        SCRIPT_LINES__[file] = list = []
      end
    end

    if l = list[line - 1]
      l
    else
      "-\n"
    end
  end
Register or log in to add new notes.