Module | Innate::View |
In: |
lib/innate/view.rb
lib/innate/view/etanni.rb lib/innate/view/erb.rb lib/innate/view/none.rb |
This is a container module for wrappers of templating engines and handles lazy requiring of needed engines.
TEMP | = | {}, {} |
We need to put this in a Mutex because simultanous calls for the same class will cause race conditions and one call may return the wrong class on the first request (before TEMP is set). No mutex is used in Fiber environment, see Innate::State and subclasses.
Reads the specified view template from the filesystem. When the read_cache option is enabled, templates will be cached to prevent unnecessary filesystem reads in the future.
@example usage
View.read('some/file.xhtml')
@param [to_str] view
@api private @see Action#render