LEL

Ruby code posted by EmmanuelSW
created at 30 Dec 03:01

Edit | Back
1
2
3
4
5
6
    #  page = CodeRay.scan_file('some_c_code.c').html
    def scan_file filename, lang = :auto, options = {}, &block
      lang = CodeRay::FileType.fetch filename, :text, true if lang == :auto
      code = File.read filename
      scan code, lang, options, &block
    end
276 Bytes in 4 ms with coderay