coderay-0.9.3 Documentation

[- Tired of blue’n’gray? Try the original version of this documentation on coderay.rubychan.de (use Ctrl+Click to open it in its own frame.) -]

About

CodeRay is a Ruby library for syntax highlighting.

Syntax highlighting means: You put your code in, and you get it back colored; Keywords, strings, floats, comments - all in different colors. And with line numbers.

Syntax Highlighting

Version: 0.9.3

Author

murphy (Kornelius Kalnbach)

Contact

murphy rubychan de

Website

coderay.rubychan.de

License

GNU LGPL; see LICENSE file in the main directory.

Installation

You need RubyGems.

 % gem install coderay

Dependencies

CodeRay needs Ruby 1.8.6 or later. It also runs with Ruby 1.9.1+ and JRuby 1.1+.

Example Usage

(Forgive me, but this is not highlighted.)

 require 'coderay'
 
 tokens = CodeRay.scan "puts 'Hello, world!'", :ruby
 page = tokens.html :line_numbers => :inline, :wrap => :page
 puts page

Documentation

See CodeRay.

Please report errors in this documentation to .

Credits

Special Thanks to

Thanks to

Where would we be without all those people?

Created using

Free

Files

Classes/Modules

Methods

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.