Returns a new RedCloth object, based on string and enforcing all the included restrictions.
r = RedCloth.new( "h1. A <b>bold</b> man", [:filter_html] ) r.to_html #=>"<h1>A <b>bold</b> man</h1>"
Source Code
# File redcloth.rb, line 254 def initialize( string, restrictions = [] ) restrictions.each { |r| method( "#{ r }=" ).call( true ) } super( string ) end
<code/>and<pre/>for code samples.