Sha256: 69b73901bdefe49f253455933ec029389050a0de73c8c46478dc0c71989b0087
Contents?: true
Size: 409 Bytes
Versions: 3
Compression:
Stored size: 409 Bytes
Contents
class LoadError REGEXPS = [ /^no such file to load -- (.+)$/i, /^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, /^Missing API definition file in (.+)$/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
3 entries across 3 versions & 1 rubygems