Method: Erubis::SchemeGenerator#add_text
- Defined in:
- lib/erubis/engine/escheme.rb
#add_text(src, text) ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/erubis/engine/escheme.rb', line 47 def add_text(src, text) return if text.empty? t = escape_text(text) if t[-1] == ?\n t[-1, 1] = '' src << "(#{@func} \"" << t << "\\n\")\n" else src << "(#{@func} \"" << t << '")' end end |