Methods
Public Class methods
Create a new filter instance. The supplied restrictions (if any) are passed directly to BlueCloth. See BlueCloth docs for details of supported restrictions.
If a block is supplied, it will be passed the BlueCloth string at render time, along with the page being rendered. It is expected to return the rendered content. If no block is supplied, to_html is called implicitly.
[ show source ]
# File lib/rote/filters/bluecloth.rb, line 27
27: def initialize(*restrictions, &blk)
28: super()
29: @restrictions = restrictions
30: @blk = blk || lambda { |bc, page| bc.to_html }
31: end
Public Instance methods
[ show source ]
# File lib/rote/filters/bluecloth.rb, line 33
33: def handler(text,page)
34: bc = ::BlueCloth.new(text)
35: @blk.call(bc, page)
36: end