class Raven::LineCache
Constants
- CACHE
Public Class Methods
getline(path, n)
click to toggle source
# File lib/raven/linecache.rb, line 19 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 11 def getlines(path) CACHE[path] ||= begin IO.readlines(path) rescue nil end end
valid_file?(path)
click to toggle source
# File lib/raven/linecache.rb, line 6 def valid_file?(path) lines = getlines(path) !lines.nil? end