Class: ZRB::HTMLBuffer

Inherits:
Buffer
  • Object
show all
Defined in:
lib/zrb.rb

Instance Method Summary collapse

Methods inherited from Buffer

#capture, #safe_append=

Instance Method Details

#escape(other) ⇒ Object



184
185
186
187
188
189
190
# File 'lib/zrb.rb', line 184

def escape(other)
  if other.respond_to?(:to_html)
    other.to_html
  else
    CGI.escape_html(other.to_s)
  end
end

#to_htmlObject



182
# File 'lib/zrb.rb', line 182

def to_html; self end