Class: Fir::TemplateAdapter
- Inherits:
-
Object
- Object
- Fir::TemplateAdapter
- Includes:
- TemplateLoading
- Defined in:
- lib/fir/pages.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(template_path) ⇒ TemplateAdapter
constructor
A new instance of TemplateAdapter.
- #render_with_layout(options) ⇒ Object
Constructor Details
#initialize(template_path) ⇒ TemplateAdapter
Returns a new instance of TemplateAdapter.
110 111 112 113 114 |
# File 'lib/fir/pages.rb', line 110 def initialize(template_path) # ERB uses the template adapter's bindings, so we don't want to pollute the # namespace any more than we have too. Thus the two preceding underscores. @__path = template_path end |
Instance Method Details
#render_with_layout(options) ⇒ Object
116 117 118 119 120 121 122 |
# File 'lib/fir/pages.rb', line 116 def render_with_layout() wrapper_template.render() do # This block will be called where "yield" appears in the wrapper template. # See comment on ErbAdapter#render. render() end end |