Sha256: b31e689d215a1cf269fecd46423ecfebab581b409f4e286df872a496d31bf121
Contents?: true
Size: 524 Bytes
Versions: 5
Compression:
Stored size: 524 Bytes
Contents
export default function(instance) { instance.registerHelper('log', function(/* message, options */) { let args = [undefined], options = arguments[arguments.length - 1]; for (let i = 0; i < arguments.length - 1; i++) { args.push(arguments[i]); } let level = 1; if (options.hash.level != null) { level = options.hash.level; } else if (options.data && options.data.level != null) { level = options.data.level; } args[0] = level; instance.log(... args); }); }
Version data entries
5 entries across 5 versions & 3 rubygems