Class: Nake::Template

Inherits:
Object show all
Defined in:
lib/nake/template.rb

Instance Method Summary collapse

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