class Opbeat::LineCache
@api private
Constants
- CACHE
Public Class Methods
all(path)
click to toggle source
# File lib/opbeat/line_cache.rb, line 7 def self.all path CACHE[path] ||= begin File.readlines(path) rescue [] end end
find(path, line)
click to toggle source
# File lib/opbeat/line_cache.rb, line 15 def self.find path, line return nil if line < 1 all(path)[line - 1] end