Class: Roda::RodaPlugins::ErubisEscaping::Eruby
- Inherits:
-
Erubis::EscapedEruby
- Object
- Erubis::EscapedEruby
- Roda::RodaPlugins::ErubisEscaping::Eruby
- Defined in:
- lib/roda/plugins/_erubis_escaping.rb
Overview
Subclass that works with specified escaper, also handling postfix conditionals inside <%= %>
tags.
Instance Method Summary collapse
-
#add_expr_escaped(src, code) ⇒ Object
Use escaping object to escape the code, and handle postfix conditionals.
-
#convert_input(codebuf, input) ⇒ Object
Set escaping object to a local variable.
Instance Method Details
#add_expr_escaped(src, code) ⇒ Object
Use escaping object to escape the code, and handle postfix conditionals.
49 50 51 |
# File 'lib/roda/plugins/_erubis_escaping.rb', line 49 def add_expr_escaped(src, code) src << " " << @bufvar << " << _erubis_escaper.escape_xml((" << code << "));" end |
#convert_input(codebuf, input) ⇒ Object
Set escaping object to a local variable
43 44 45 46 |
# File 'lib/roda/plugins/_erubis_escaping.rb', line 43 def convert_input(codebuf, input) codebuf << '_erubis_escaper = render_opts[:escaper];' super end |