Class: H2o::Tags::Raw
Instance Method Summary collapse
-
#initialize(parser, argstring) ⇒ Raw
constructor
A new instance of Raw.
- #render(context, stream) ⇒ Object
Constructor Details
#initialize(parser, argstring) ⇒ Raw
Returns a new instance of Raw.
4 5 6 |
# File 'lib/h2o/tags/raw.rb', line 4 def initialize(parser, argstring) @body = parser.parse(:endraw) end |
Instance Method Details
#render(context, stream) ⇒ Object
8 9 10 11 12 |
# File 'lib/h2o/tags/raw.rb', line 8 def render(context, stream) raw_body = @body.parser.source.gsub(/\{%\s?(:?end)?raw\s?%\}/sm, '') stream << raw_body end |