Class: Massimo::View

Inherits:
Resource show all
Defined in:
lib/massimo/view.rb

Instance Attribute Summary

Attributes inherited from Resource

#content, #source_path

Instance Method Summary collapse

Methods inherited from Resource

all, #extension, #extensions, #filename, find, #initialize, #output_path, path, #process, processable?, resource_name, url, #url

Constructor Details

This class inherits a constructor from Massimo::Resource

Instance Method Details

#render(locals = {}, &block) ⇒ Object



7
8
9
10
11
# File 'lib/massimo/view.rb', line 7

def render(locals = {}, &block)
  template_options = Massimo.config.options_for(extension[1..-1])
  template         = Tilt.new(source_path.to_s, 1, template_options) { content }
  template.render(template_scope, locals, &block)
end