# class Raven::LineCache

### Constants

CACHE

### Public Class Methods

getline(path, n) click to toggle source

    # File lib/raven/linecache.rb, line 21
    def getline(path, n)
      return nil if n < 1
      lines = getlines(path)
      return nil if lines.nil?
      lines[n - 1]
    end

getlines(path) click to toggle source

    # File lib/raven/linecache.rb, line 13
    def getlines(path)
      CACHE[path] ||= begin
        IO.readlines(path)
      rescue
        nil
      end
    end

is_valid_file(path) click to toggle source

    # File lib/raven/linecache.rb, line 8
    def is_valid_file(path)
      lines = getlines(path)
      !lines.nil?
    end