Sha256: 117239c532a2e20689e4c743c20d1c5b8c81303698eb13a419b9132a7331fe78

Contents?: true

Size: 521 Bytes

Versions: 85

Compression:

Stored size: 521 Bytes

Contents

class ERB
  module Util

    #
    # 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>
    #
    def textilize( s )
      if s && s.respond_to?(:to_s)
        RedCloth.new( s.to_s ).to_html
      end
    end

    alias t textilize
    module_function :t
    module_function :textilize

  end
end

Version data entries

85 entries across 85 versions & 9 rubygems

Version Path
RedCloth-4.3.4 lib/redcloth/erb_extension.rb
RedCloth-4.3.3 lib/redcloth/erb_extension.rb
BBRedCloth-0.9.0.alpha1 lib/redcloth/erb_extension.rb
gv-RedCloth-4.3.2 lib/redcloth/erb_extension.rb
RedCloth-4.3.2 lib/redcloth/erb_extension.rb
RedCloth-4.3.1 lib/redcloth/erb_extension.rb
RedCloth-4.3.0 lib/redcloth/erb_extension.rb
parity-RedCloth-4.2.13 lib/redcloth/erb_extension.rb
parity-RedCloth-4.2.12 lib/redcloth/erb_extension.rb
parity-RedCloth-4.2.11 lib/redcloth/erb_extension.rb
parity-RedCloth-4.2.10 lib/redcloth/erb_extension.rb
parity-RedCloth-4.2.9 lib/redcloth/erb_extension.rb
jeremy-RedCloth-4.1.1 lib/redcloth/erb_extension.rb
YSRedCloth-4.2.18 lib/redcloth/erb_extension.rb
assplecake-RedCloth-4.2.10 lib/redcloth/erb_extension.rb
YSRedCloth-4.2.17 lib/redcloth/erb_extension.rb
YSRedCloth-4.2.16 lib/redcloth/erb_extension.rb
BBRedCloth-0.8.8 lib/redcloth/erb_extension.rb
gv-RedCloth-4.2.9 lib/redcloth/erb_extension.rb
YSRedCloth-4.2.15 lib/redcloth/erb_extension.rb