Merge pull request #94 from jeromegn/kilt

Abstract template engines with Kilt
This commit is contained in:
Serdar Dogruyol 2016-02-14 20:47:51 +02:00
commit 5bd28d6956
2 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,8 @@ version: 0.9.0
dependencies:
radix:
github: luislavena/radix
kilt:
github: jeromegn/kilt
author:
- Serdar Dogruyol <dogruyolserdar@gmail.com>

View file

@ -1,4 +1,4 @@
require "ecr/macros"
require "kilt"
# Uses built-in ECR to render views.
# # Usage
@ -7,7 +7,7 @@ require "ecr/macros"
# end
macro render(filename)
__view__ = String::Builder.new
embed_ecr({{filename}}, "__view__")
Kilt.embed({{filename}}, "__view__")
__view__.to_s
end