lib/erector/html.rb
def text(value)
      if value.is_a? Widget
        widget value
      else
        output << h(value)
      end
      nil
    end
# Emits text.  If a string is passed in, it will be HTML-escaped. If the
# result of calling methods such as raw is passed in, the HTML will not be
# HTML-escaped again. If another kind of object is passed in, the result
# of calling its to_s method will be treated as a string would be.
#
# You shouldn't pass a widget in to this method, as that will cause
# performance problems (as well as being semantically goofy). Use the
# #widget method instead.
Emits text.  If a string is passed in, it will be HTML-escaped. If the
result of calling methods such as raw is passed in, the HTML will not be
HTML-escaped again. If another kind of object is passed in, the result
of calling its to_s method will be treated as a string would be.

You shouldn't pass a widget in to this method, as that will cause
performance problems (as well as being semantically goofy). Use the
widget method instead.
Emits text . If a string is passed in it will be HTML - escaped . If the result of calling methods such as raw is passed in the HTML will not be HTML - escaped again . If another kind of object is passed in the result of calling its to_s method will be treated as a string would be . You shouldn ' t pass a widget in to this method as that will cause performance problems ( as well as being semantically goofy ) . Use the widget method instead .
def text(value)
      if value.is_a? Widget
        widget value
      else
        output << h(value)
      end
      nil
    end
def text ( value ) if value . is_a? Widget widget value else output << h ( value ) end nil end
Emits text.
Emits text .
value