Class: Nake::Template
Instance Method Summary (collapse)
-
- (Template) initialize(path)
constructor
A new instance of Template.
- - (Object) render(context = Hash.new)
Constructor Details
- (Template) initialize(path)
A new instance of Template
21 22 23 |
# File 'lib/nake/template.rb', line 21 def initialize(path) @path = path end |
Instance Method Details
- (Object) render(context = Hash.new)
25 26 27 |
# File 'lib/nake/template.rb', line 25 def render(context = Hash.new) File.read(@path) % context end |