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