Class: Dimples::Template
Overview
A class for a single ERB template file used on a site.
Constant Summary
Constants inherited from Entry
Entry::DEFAULT_FILENAME, Entry::FRONT_MATTER_PATTERN
Instance Attribute Summary
Attributes inherited from Entry
#contents, #metadata, #path, #site
Instance Method Summary collapse
-
#initialize(site:, path:) ⇒ Template
constructor
A new instance of Template.
- #render(payload: nil) ⇒ Object
Methods inherited from Entry
#generate, #method_missing, #parse_metadata, #respond_to_missing?, #template
Constructor Details
#initialize(site:, path:) ⇒ Template
Returns a new instance of Template.
8 9 10 |
# File 'lib/dimples/template.rb', line 8 def initialize(site:, path:) super(site:, source: Pathname.new(path)) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Dimples::Entry