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
9 10 11 |
# File 'lib/rack/app/front_end/template.rb', line 9 def self.cache @cache ||= Rack::App::FrontEnd::Template::Cache.new end |
.template?(file_path) ⇒ Boolean
13 14 15 |
# File 'lib/rack/app/front_end/template.rb', line 13 def self.template?(file_path) not Tilt.templates_for(file_path).empty? end |
Instance Method Details
#render(scope, variables = {}, &block) ⇒ Object
17 18 19 |
# File 'lib/rack/app/front_end/template.rb', line 17 def render(scope, variables={}, &block) layout.render(scope, variables) { template.render(scope, variables, &block) } end |