Class: Hanami::View::Rendering::PartialFinder Private
- Inherits:
-
TemplateFinder
- Object
- TemplatesFinder
- TemplateFinder
- Hanami::View::Rendering::PartialFinder
- Defined in:
- lib/hanami/view/rendering/partial_finder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Find a partial for the current view context. It’s used when a template wants to render a partial.
Constant Summary collapse
- PREFIX =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Template file name prefix. By convention a partial file name starts with this prefix.
'_'.freeze
Constants inherited from TemplatesFinder
TemplatesFinder::ENGINES, TemplatesFinder::FORMAT, TemplatesFinder::RECURSIVE
Instance Method Summary collapse
-
#find ⇒ Hanami::View::Template
private
Find a template for a partial.
Methods inherited from TemplateFinder
Methods inherited from TemplatesFinder
Constructor Details
This class inherits a constructor from Hanami::View::Rendering::TemplateFinder
Instance Method Details
#find ⇒ Hanami::View::Template
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Find a template for a partial. Initially it will look for the partial template in the framework configuration where it may already be cached. Failing that it will look under the directory of the parent directory view template, if not found it will search recursively from the view root.
37 38 39 40 |
# File 'lib/hanami/view/rendering/partial_finder.rb', line 37 def find Hanami::View::Configuration.for(@view). find_partial(relative_partial_path, template_name, format) end |