This is taken from the manual and modified a bit (convertor needed an s in the end):
require 'rubygems' # Step 1: require the HTML convertor require 'syntax/convertors/html'
# Step 2: get an instance of the HTML convertor for the Ruby syntax convertor = Syntax::Convertors::HTML.for_syntax "ruby"
# Step 3: convert the text to HTML puts convertor.convert( File.read( "hilight.rb" ) )
It will output the contents of hilight.rb as syntax highlighted HTML to the console. Is this enough?