class MyView < Mustache def markdown(str = nil) if str Markdown.new(str.to_s).to_html else lambda { |text| markdown(render(text)) } end end end