Module: Haml::Filters::Documentation

Includes:
Base
Defined in:
lib/rbbt/rest/common/misc.rb

Instance Method Summary collapse

Instance Method Details

#render(text) ⇒ Object



243
244
245
246
247
248
249
250
251
# File 'lib/rbbt/rest/common/misc.rb', line 243

def render(text)
  doc_text ="%section.documentation\#{ text.gsub(/\\s/,'').length < 80 * 10 ? '.short' : ''}\n:markdown\n\#{text.gsub(/^/,\"    \")}\n  EOF\n\n  Haml::Engine.new(doc_text).to_html  \nend\n"