Class: Nake::Template

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

Instance Method Summary (collapse)

Constructor Details

- (Template) initialize(path)



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