class HTMLComponent::Builder

Public Instance Methods

to_s() click to toggle source

Converts the Builder instance to an HTML-safe String. This does not guarantee the string is valid HTML, just safe.

# File lib/html-native-rails.rb, line 47
def to_s
  unless @cached
    @cache << @strings.join.html_safe
    @strings.clear
    @cached = true
  end
  @cache.html_safe
end
Also aliased as: to_str
to_str()

Allows for implicit conversion to html_safe strings

Alias for: to_s