Module: StupidFormatter::CoderayHelper

Defined in:
lib/stupid_formatter.rb

Instance Method Summary collapse

Instance Method Details

#highlight(language = :ruby) ⇒ Object



88
89
90
91
# File 'lib/stupid_formatter.rb', line 88

def highlight(language=:ruby)
  code = capture { yield }
  @output_buffer << CodeRay.scan(code, language).div(:css => :class)
end