Sha256: b11af8bc3fb4a889ccf4bf066ea645dbf0011519dc916950c7abe919ecf3966c
Contents?: true
Size: 503 Bytes
Versions: 76
Compression:
Stored size: 503 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, ] unless method_defined?(:path) def path @path ||= begin REGEXPS.find do |regex| message =~ regex end $1 end end end def is_missing?(location) location.sub(/\.rb$/, '') == path.sub(/\.rb$/, '') end end MissingSourceFile = LoadError
Version data entries
76 entries across 76 versions & 5 rubygems