class Handlebars::Template
Public Class Methods
new(hbs, ast)
click to toggle source
# File lib/ruby-handlebars/template.rb, line 5 def initialize(hbs, ast) @hbs = hbs @ast = ast end
Public Instance Methods
call(args = nil)
click to toggle source
# File lib/ruby-handlebars/template.rb, line 10 def call(args = nil) ctx = Context.new(@hbs, args) @ast.eval(ctx) end
call_with_context(ctx)
click to toggle source
# File lib/ruby-handlebars/template.rb, line 16 def call_with_context(ctx) @ast.eval(ctx) end