Module: Haml::Filters::Documentation
- Includes:
- Base
- Defined in:
- lib/rbbt/rest/common/misc.rb
Instance Method Summary collapse
Instance Method Details
#render(text) ⇒ Object
271 272 273 274 275 276 277 278 279 |
# File 'lib/rbbt/rest/common/misc.rb', line 271 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" |