| Module | ERB::Util |
| In: |
lib/redcloth/erb_extension.rb
lib/redcloth/erb_extension.rb |
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, line 16
16: def textilize( s )
17: if s && s.respond_to?(:to_s)
18: RedCloth.new( s.to_s ).to_html
19: end
20: end
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, line 16
16: def textilize( s )
17: if s && s.respond_to?(:to_s)
18: RedCloth.new( s.to_s ).to_html
19: end
20: end