Class: ZfbenExtend::HTMLwithCodeRay

Inherits:
Redcarpet::Render::HTML
  • Object
show all
Defined in:
lib/zfben_extend/string.rb

Instance Method Summary collapse

Instance Method Details

#block_code(code, lang) ⇒ Object



104
105
106
107
# File 'lib/zfben_extend/string.rb', line 104

def block_code code, lang
  lang = lang.nil? ? :ruby : lang.to_sym
  CodeRay.scan(code, lang).div
end