Module Innate::View
In: lib/innate/view/none.rb
lib/innate/view/etanni.rb
lib/innate/view/erb.rb
lib/innate/view.rb

This is a container module for wrappers of templating engines and handles lazy requiring of needed engines.

Methods

compile   exts_of   get   obtain   read   register  

Included Modules

Optioned

Classes and Modules

Module Innate::View::ERB
Module Innate::View::Etanni
Module Innate::View::None

Constants

TEMP = {}, {}

Public Instance methods

Try to obtain given engine by its registered name.

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

Register given templating engine wrapper and extensions for later usage.

name : the class name of the templating engine wrapper exts : any number of arguments will be turned into strings via to_s

         that indicate which filename-extensions the templates may have.

[Validate]