1
0

Add Handlebars

This commit is contained in:
2013-12-15 02:07:07 +07:00
parent d4ec63d52c
commit bcc555b585
8 changed files with 83 additions and 4 deletions
+16
View File
@@ -0,0 +1,16 @@
module Workbench
module Wrappers
class Handlebars < Base
@@context = ::Handlebars::Context.new
def initialize path
@engine = @@context.compile(File.read(path))
end
def render context, args = {}
@engine.call(args)
end
end
end
end