require 'coderay' # (1)
html = CodeRay.scan("puts 'Hello, world!'", :ruby).div line_numbers: :table # (2)
puts html # (3) (4)
exit 0 # (5)(6)
require 'coderay' # (1)
html = CodeRay.scan("puts 'Hello, world!'", :ruby).div line_numbers: :table # (2)
puts html # (3) (4)
exit 0 # (5)(6)
Load library
Highlight source
Print to stdout
Redirect to a file to capture output
Exit program
Reports success