Module: MasterView

Defined in:
lib/masterview.rb,
lib/masterview.rb,
lib/masterview/parser.rb,
lib/masterview/directives/if.rb,
lib/masterview/directive_base.rb,
lib/masterview/extras/watcher.rb,
lib/masterview/directives/else.rb,
lib/masterview/directives/form.rb,
lib/masterview/runtime_helpers.rb,
lib/masterview/directives/block.rb,
lib/masterview/directives/elsif.rb,
lib/masterview/directive_helpers.rb,
lib/masterview/directives/submit.rb,
lib/masterview/directives/content.rb,
lib/masterview/directives/link_to.rb,
lib/masterview/directives/preview.rb,
lib/masterview/directives/replace.rb,
lib/masterview/masterview_version.rb,
lib/masterview/directives/text_area.rb,
lib/masterview/plugin_load_tracking.rb,
lib/masterview/directives/link_to_if.rb,
lib/masterview/directives/testfilter.rb,
lib/masterview/directives/text_field.rb,
lib/masterview/directives/hidden_field.rb,
lib/masterview/directives/link_to_remote.rb,
lib/masterview/directives/password_field.rb,
lib/masterview/directives/stylesheet_link.rb,
lib/masterview/directives/global_inline_erb.rb,
lib/masterview/directives/javascript_include.rb,
lib/masterview/directives/insert_generated_comment.rb

Overview

set these constants after everything has been required

Defined Under Namespace

Modules: DirectiveHelpers, Directives, PluginLoadTracking, RuntimeHelpers, VERSION Classes: ConsoleSerializer, DirectiveBase, DirectiveCallStack, DirectiveSet, FileSerializer, HashSerializer, InvalidPathException, MasterViewListener, Parser, RenderLevel, RenderMode, Renderer, SimpleRenderHandler, Tag, TemplateFileWatcher

Constant Summary collapse

RescueExceptions =

set to true to have exceptions rescued

false
DefaultParserOptions =

:tidy - run tidy before parsing (set TidyPath), :escape_erb - escapes <% %> before parsing

{ :tidy => false, :escape_erb => true }
DefaultDirectiveLoadPaths =

paths to load directives from, append your own paths to load custom directives

[ File.join( File.dirname(__FILE__), 'masterview/directives') ]
NamespacePrefix =

prefix attributes in html with this value

'mv:'
TemplateSrcRelativePath =

relative path under RAILS_ROOT/app/views where masterview templates are loaded

'masterview'
TemplateFilenamePattern =

masterview template filename pattern

'*.html'
TemplateDestRelativePath =

relative path to RAILS_ROOT/app/views where erb (rhtml) will be generated

''
OmitGeneratedComments =

boolean which determines whether warning comments will be ommitted (not generated) in rhtml indicating the generated file should not be manually edited, false = generate the warning comments

false
AutoParseMasterViewFiles =

boolean which determines whether masterview files will be parsed during rails load and watched on requests. If true then masterview files will be parsed on rails loading. Additionally if this is true and the ActionController::Base.perform_caching is false (normally in development mode) then the masterview files will again be checked (using modified time) to see if any files need to be re-parsed. In production mode ActionController::Base.perform_caching is normally true and thus masterview files will only be parsed on first load. If this constant is set to false then no automatic watching or parsing occurs, it would be assumed that the parsing would have been manually triggered prior.

true
InlineErbStart =

xhtml safe substitution for ‘<%’, make sure to update InlineErbSubstitutionRegex if changed

'{{{'
InlineErbEnd =

xhtml safe substitution for ‘%>’, make sure to update InlineErbSubstitutionRegex if changed

'}}}'
InlineErbSubstitutionRegex =

regex used to find escaped InlineErb, needs to match InlineErbStart and InlineErbEnd

/\{\{\{(([^}]|\}[^}]|\}\}[^}])*)\}\}\}/
TidyPath =

sets path to tidy library on this system so masterview templates will be first run through tidy before parsing, required if DefaultParserOptions :tidy => true This allows invalid xhtml to be corrected before parsing

'/usr/lib/libtidy.so'
DefaultSerializer =
FileSerializer