module ERB::Util
Public Class Methods
textilize( s )
click to toggle source
A utility method for transforming Textile in s to HTML.
require "erb" include ERB::Util puts textilize("Isn't ERB *great*?")
Generates
<p>Isn’t <span class="caps">ERB</span> <strong>great</strong>?</p>
# File lib/redcloth/erb_extension.rb 16 def textilize( s ) 17 if s && s.respond_to?(:to_s) 18 RedCloth.new( s.to_s ).to_html 19 end 20 end
Also aliased as: t