Module | Erubis::PerlGenerator |
In: |
erubis/engine/eperl.rb
|
# File erubis/engine/eperl.rb, line 49 def add_expr_debug(src, code) code.strip! s = code.gsub(/\'/, "\\'") src << @func << "('*** debug: #{code}=', #{code}, \"\\n\");" end
# File erubis/engine/eperl.rb, line 45 def add_expr_escaped(src, code) add_expr_literal(src, escaped_expr(code)) end
# File erubis/engine/eperl.rb, line 40 def add_expr_literal(src, code) code.strip! src << @func << "(" << code << "); " end
# File erubis/engine/eperl.rb, line 36 def add_text(src, text) src << @func << "('" << escape_text(text) << "'); " unless text.empty? end
# File erubis/engine/eperl.rb, line 32 def escape_text(text) return text.gsub!(/['\\]/, '\\\\\&') || text end