From: Quintus Date: 2011-01-05T04:12:51+09:00 Subject: Re: How to export highlighted syntax from IRB Am 04.01.2011 19:15, schrieb Jason Lillywhite: > Here is my best solution so far: > > Use http://tryruby.org/ to generate the html I need for my document then > paste it right in. > > I would have loved to see it the same color theme as that used on > ruby-lang.org but oh well. > > Jason > Your could pass your whole code through CodeRay: -------------------------- require "coderay" html = CodeRay.scan("puts 'Your Code goes here!'", :ruby).html(:wrap => :div) puts html ------------------------ The according CSS stylesheet is outputted by the shell command $ coderay_stylesheet CodeRay is available as a gem: # gem install coderay Vale, Marvin