Module: ERB::Util

Module | ERB::Util
In: | lib/redcloth/erb_extension.rb lib/redcloth/erb_extension.rb

### Methods

t t textilize textilize

### Public Instance methods

t( s )

Alias for textilize

t( s )

Alias for textilize

textilize( s )

A utility method for transforming Textile in s to HTML.

      require "erb"
      include ERB::Util

      puts textilize("Isn't ERB *great*?")

Generates

      <p>Isn&#8217;t <span class="caps">ERB</span> <strong>great</strong>?</p>

[Source]

        # 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

textilize( s )

A utility method for transforming Textile in s to HTML.

      require "erb"
      include ERB::Util

      puts textilize("Isn't ERB *great*?")

Generates

      <p>Isn&#8217;t <span class="caps">ERB</span> <strong>great</strong>?</p>

[Source]

        # 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

[Validate]