Class: Inversion::Template::StripTag
- Inherits:
-
AttrTag
- Object
- AttrTag
- Inversion::Template::StripTag
- Includes:
- Escaping
- Defined in:
- lib/inversion/template/striptag.rb
Overview
Inversion strip tag.
This tag strips markup from a template attribute.
Syntax
<?strip foo.bar ?>
Constant Summary collapse
- HTML_TAG =
%r{ < /? \p{Alnum}+ ( \s+ \S+="[^\"]*" )* \s* > }xi
Instance Method Summary collapse
-
#render(render_state) ⇒ Object
Render the method chains against the attributes of the specified
render_stateand return them.
Instance Method Details
#render(render_state) ⇒ Object
Render the method chains against the attributes of the specified render_state and return them.
35 36 37 38 |
# File 'lib/inversion/template/striptag.rb', line 35 def render( render_state ) raw = super or return nil return raw.gsub(HTML_TAG, '') end |