Module: Awestruct::Blueclothable
- Included in:
- MarukuFile
- Defined in:
- lib/awestruct/blueclothable.rb
Instance Method Summary collapse
Instance Method Details
#content ⇒ Object
24 25 26 27 |
# File 'lib/awestruct/blueclothable.rb', line 24 def content context = site.engine.create_context( self ) render( context ) end |
#render(context) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/awestruct/blueclothable.rb', line 6 def render(context) rendered = '' begin = { :smartypants => true } unless self..nil? .merge!({ :smartypants => false }) if self.[:html_entities] == false end doc = BlueCloth.new( context.interpolate_string( raw_page_content ), ) rendered = doc.to_html rescue => e puts e puts e.backtrace end rendered end |