module CodeRay

def scan_file filename, lang = :auto, options = {}, &block

page = CodeRay.scan_file('some_c_code.c').html
require 'coderay'
Example:

Calls CodeRay.scan.

CodeRay::Scanners::Text.
determine it. If it cannot find out what type it is, it uses
If +lang+ is :auto or omitted, the CodeRay::FileType module is used to

Scans +filename+ (a path to a code file) with the Scanner for +lang+.
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