Class: WLang::Dummy
Overview
The dummy dialect, which has no tag at all.
This dialect can be used to parse tag blocks without further interpreting any wlang tag. This is needed to flush wlang output in certain situations as illustrated by the following template:
Hello ${who}! This is wlang, a templating language which comes with
special such as %{ ${who}, +{who}, *{}{...}, etc }
The special tag %{ } might easily be implemented using the Dummy dialect:
require 'wlang/dummy'
class MyDialect < WLang::Dialect
def dollar(buf, fn)
buf << evaluate(fn)
end
def no_wlang(buf, fn)
render(fn)
end
tag '$', :dollar
tag '%', [WLang::Dummy], :no_wlang
end
Instance Attribute Summary
Attributes inherited from Dialect
Method Summary
Methods inherited from Dialect
#braces, compile, #context, default_options, define_tag_method, #dialects_for, #evaluate, #initialize, render, #render, #scope, tag, tag_dispatching_name, #with_scope
Constructor Details
This class inherits a constructor from WLang::Dialect