Add ability to register template engine outside the library

This commit is contained in:
Oleksii Fedorov 2016-02-14 22:17:31 +01:00
parent 5f23a69c15
commit ee7059effd
3 changed files with 72 additions and 10 deletions

View file

@ -1,9 +1,11 @@
require "spec"
require "../src/kilt"
require "slang"
Kilt.register_template(".slang", embed_slang)
macro render_file(filename)
String.build do |__io__|
Kilt.embed({{filename}}, "__io__")
end
end
end