Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Opal.require('opal-builder');
Opal.require('opal-source-maps');
/**
* Convert a JSON to an (Opal) Hash.
* @private
*/
var toHash = function (object) {
if (object && !object.smap) {
return Opal.hash(object);
}
return object;
};
var Builder = Opal.const_get_qualified(Opal.const_get_relative([], 'Opal'), 'Builder');
var ERB = Opal.const_get_qualified(Opal.const_get_relative([], 'Opal'), 'ERB');
// Public API
Builder['$$class'].prototype.create = function () {
return this.$new();
};
Builder.prototype.appendPaths = function (paths) {
this.$append_paths(paths);
};
Builder.prototype.setCompilerOptions = function (options) {
this.compiler_options = toHash(options);
};
Builder.prototype.build = function (path, options) {