diff options
author | no author <noone@nowhere> | 2005-09-26 02:58:54 +0000 |
---|---|---|
committer | no author <noone@nowhere> | 2005-09-26 02:58:54 +0000 |
commit | 84b8431608174e74a4c0d2394eb330a6621bc74b (patch) | |
tree | ffc2bd7ce21708a9147247c80b0e7fc7728ea063 /demo/demo_simple.rb | |
download | coderay-84b8431608174e74a4c0d2394eb330a6621bc74b.tar.gz |
New Repository, initial import
Diffstat (limited to 'demo/demo_simple.rb')
-rw-r--r-- | demo/demo_simple.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/demo/demo_simple.rb b/demo/demo_simple.rb new file mode 100644 index 0000000..a3129b0 --- /dev/null +++ b/demo/demo_simple.rb @@ -0,0 +1,10 @@ +
+# Load CodeRay
+# If this doesn't work, try ruby -rubygems.
+require 'coderay'
+
+# Generate HTML page for Ruby code.
+page = CodeRay.scan("puts 'Hello, world!'", :ruby).span
+
+# Print it
+puts page
|