Class: Jadeite::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/jadeite/environment.rb

Instance Method Summary collapse

Constructor Details

#initialize(compiled) ⇒ Template

Returns a new instance of Template.



80
81
82
# File 'lib/jadeite/environment.rb', line 80

def initialize(compiled)
  @compiled = compiled
end

Instance Method Details

#render(data = {}) ⇒ Object



84
85
86
# File 'lib/jadeite/environment.rb', line 84

def render(data={})
  @compiled.call data
end

#to_sObject



88
89
90
# File 'lib/jadeite/environment.rb', line 88

def to_s
  @compiled.to_s
end