class Raven::LineCache

Constants

CACHE

Public Class Methods

getline(path, n) click to toggle source
# File lib/raven/linecache.rb, line 17
def getline(path, n)
  return nil if n < 1
  getlines(path)[n - 1]
end
getlines(path) click to toggle source
# File lib/raven/linecache.rb, line 9
def getlines(path)
  CACHE[path] ||= begin
    IO.readlines(path)
  rescue
    []
  end
end