Sha256: 8221b53210fe100b33b262edda6bd3c165c9cd3047534a62ce206b2805b8e9d0
Contents?: true
Size: 449 Bytes
Versions: 320
Compression:
Stored size: 449 Bytes
Contents
class LoadError REGEXPS = [ /^no such file to load -- (.+)$/i, /^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, /^Missing API definition file in (.+)$/i, /^cannot load such file -- (.+)$/i, ] def path @path ||= begin REGEXPS.find do |regex| message =~ regex end $1 end end def is_missing?(location) location.sub(/\.rb$/, '') == path.sub(/\.rb$/, '') end end MissingSourceFile = LoadError
Version data entries
320 entries across 276 versions & 28 rubygems