class Merger

Defined in:

merger.cr

Constant Summary

PRE = "--[[\nWARNING\nThe code below has been generated by LuaMerger\nhttps://gitlab.com/zatherz/LuaMerger\nDo not modify this code unless you have no original source code!\n\nLuaMerger is a tool that lets you merge Lua scripts to gain\na limited alternative to `require` in restricted environments,\nwhich makes it possible to nicely organize your scripts.\n]]"
REQUIRE_FUNCTION = "function require(path)\n if package.loaded[path] then\n return package.loaded[path]\n end\n assert(type(path) == \"string\", \"[luamerger] bad argument #1 to 'require' (string expected, got \" .. type(path) .. \")\")\n m = package.fake[path]\n assert(m, \"[luamerger] Module '\" .. path .. \"' not merged\")\n package.loaded[path] = m()\n return package.loaded[path]\nend"
TABLE_DEF = "package = {\n old = {\n package = package,\n require = require\n },\n loaded = {},\n fake = {}\n}"

Constructors

Instance Method Summary

Constructor Detail

def self.new(main : String = "") #

[View source]

Instance Method Detail

def add_module(mod : Module) #

[View source]
def main : String #

[View source]
def main=(main : String) #

[View source]
def to_s(io) #

[View source]