module InVFS::Kernel
Private Instance Methods
require(lib)
click to toggle source
Calls superclass method
# File lib/invfs.rb, line 147 def require(lib) __BREAKHERE__ (vfs, sub) = InVFS.findvfs(Pathname(lib).cleanpath.to_path, false) if vfs return false if InVFS.loaded?(vfs, sub) InVFS.require_in(vfs, sub) else super lib end end
require_relative(lib)
click to toggle source
# File lib/invfs.rb, line 159 def require_relative(lib) __BREAKHERE__ base = caller_locations(1, 1)[0] (vfs, sub) = InVFS.findvfs(base.path, true) if vfs sub = (Pathname(sub) + ".." + lib).cleanpath.to_path sub = InVFS.findlib(vfs, sub, false) raise LoadError, "cannot load such file - #{lib}" unless sub return false if InVFS.loaded?(vfs, sub) InVFS.require_in(vfs, sub) else eval <<-"REQUIRE_RELATIVE", binding, base.path, base.lineno super lib REQUIRE_RELATIVE end end