Class: Jadeite::Template
- Inherits:
-
Object
- Object
- Jadeite::Template
- Defined in:
- lib/jadeite/environment.rb
Instance Method Summary collapse
-
#initialize(compiled) ⇒ Template
constructor
A new instance of Template.
- #render(data = {}) ⇒ Object
- #to_s ⇒ Object
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_s ⇒ Object
88 89 90 |
# File 'lib/jadeite/environment.rb', line 88 def to_s @compiled.to_s end |