Module: Cheri::Html::HtmlBuilder

Included in:
CommentElem, Elem, EmptyElem, TextElem
Defined in:
lib/cheri/builder/html/element.rb

Overview

Included by all Cheri::Html builders

Instance Method Summary collapse

Instance Method Details

#esc(inp, out = nil) ⇒ Object



36
37
38
39
40
41
42
43
44
45
# File 'lib/cheri/builder/html/element.rb', line 36

def esc(inp,out=nil)
  if @opt[:esc] && (cs = Charsets.charset(inp))
    cs.xlat(inp,(out ||= ''))
    out
  elsif out
    out << inp
  else
    inp
  end
end