Object
# File lib/less/loader.rb, line 20 def require(path) unless exports = @exports[path] filename = path =~ /\.js$/ ? path : "#{path}.js" filepath = @path.join(filename) fail LoadError, "no such file: #{filename}" unless filepath.exist? lock do load = @cxt.eval("(function(process, require, exports, __dirname) {require.paths = [];#{File.read(filepath)}})", filepath.expand_path) @exports[path] = exports = @cxt['Object'].new load.call(@process, method(:require), exports, Dir.pwd) end end return exports end
Generated with the Darkfish Rdoc Generator 2.