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



187
188
189
190
191
192
193
# File 'lib/zrb.rb', line 187

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

#to_htmlObject



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

def to_html; self end