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’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