Module: SyntaxHelper

Defined in:
app/helpers/syntax_helper.rb

Instance Method Summary collapse

Instance Method Details

#code(language, &block) ⇒ Object



2
3
4
5
# File 'app/helpers/syntax_helper.rb', line 2

def code language, &block
  content = capture(&block)
  return "<pre><code class=\"#{language}\">#{content}</code></pre>".html_safe
end