puts "Hello, World!"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'coderay'

puts CodeRay.highlight('puts "Hello, World!"', :ruby)

output = CodeRay.highlight_file($0, :line_numbers => :table)
puts <<HTML
<html>
<head>
#{output.stylesheet true}
<body>
#{output}
</body>
</html>
HTML