Class: Rack::App::FrontEnd::Template
- Inherits:
-
Object
- Object
- Rack::App::FrontEnd::Template
- Defined in:
- lib/rack/app/front_end/template.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.cache ⇒ Object
8 9 10 |
# File 'lib/rack/app/front_end/template.rb', line 8 def self.cache @cache ||= Tilt::Cache.new end |
.template?(file_path) ⇒ Boolean
12 13 14 |
# File 'lib/rack/app/front_end/template.rb', line 12 def self.template?(file_path) not Tilt.templates_for(file_path).empty? end |
Instance Method Details
#render(scope, variables = {}, &block) ⇒ Object
16 17 18 |
# File 'lib/rack/app/front_end/template.rb', line 16 def render(scope, variables={}, &block) layout.render(scope, variables) { template.render(scope, variables, &block) } end |