Class | Iowa::Application |
In: |
src/Application.rb
|
Parent: | Object |
Application sits at the top of everything. This class represents an entire Iowa application and handles the things relevant to the application as a whole.
BindingCommentsRegexp | = | /^\s*#.*$/ |
mapfile | [RW] |
import is used to make other templates available within the context of the template where it is called.
reload both the an optional .iwa file and the corresponding .html/.view file if the mtimes on either is later than the mtime in the cache This curently scans every file in the directory every single time a request is handled. For a large app with a lot of files, this wastefully burns a lot of time. So, the exact behavior of the scan is going to become selectable. The code will provide, in addition to this "scan everything" approach, the option to only look at the file for the class currently being executed. Most of the time, this is all that is needed, and when it is less than is needed, one can tell the application to switch to the other mode.
Set the reload scanning mode. The two current settings are ‘singular’ and ‘plural’.
singular: only check the named template for loading. This is much more efficient for large applications as it eliminates making a stat() system call on each file for every single request. Most of the time this should be sufficient for detecting any changes that have been made and reloading them. If, in some case, it is found not to be sufficient, one can set the mode to 'plural' which is the old normal mode of operation. 'singular' is the default mode of operation. plural: checks the mtime of every file in the iowa docroot directory every time a request is handled. This is guaranteed to detect and reload changes in every file. For sites that have a lot of files in their docroot, though, this is a performance hit.