Module: Erubis::EscapeEnhancer
- Included in:
- EscapedEc, EscapedEcpp, EscapedEjava, EscapedEjavascript, EscapedEperl, EscapedEphp, EscapedEruby, EscapedEscheme, OptimizedXmlEruby, XmlEruby
- Defined in:
- lib/erubis/enhancer.rb
Overview
Class Method Summary collapse
-
.desc ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#add_expr(src, code, indicator) ⇒ Object
– def self.included(klass) klass.class_eval <<-END alias _add_expr_literal add_expr_literal alias _add_expr_escaped add_expr_escaped alias add_expr_literal _add_expr_escaped alias add_expr_escaped _add_expr_literal END end ++.
Class Method Details
.desc ⇒ Object
:nodoc:
22 23 24 |
# File 'lib/erubis/enhancer.rb', line 22 def self.desc # :nodoc: "switch '<%= %>' to escaped and '<%== %>' to unescaped" end |
Instance Method Details
#add_expr(src, code, indicator) ⇒ Object
– def self.included(klass)
klass.class_eval <<-END
alias _add_expr_literal add_expr_literal
alias _add_expr_escaped add_expr_escaped
alias add_expr_literal _add_expr_escaped
alias add_expr_escaped _add_expr_literal
END
end ++
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/erubis/enhancer.rb', line 37 def add_expr(src, code, indicator) case indicator when '=' @escape ? add_expr_literal(src, code) : add_expr_escaped(src, code) when '==' @escape ? add_expr_escaped(src, code) : add_expr_literal(src, code) when '===' add_expr_debug(src, code) end end |