Module: Erubis::EscapeEnhancer
- Included in:
- EscapedEc, 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:
23 24 25 |
# File 'lib/erubis/enhancer.rb', line 23 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 ++
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/erubis/enhancer.rb', line 38 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 |