blob: 42bdab62873ae6877e0144eff5bba855036a58d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# CodeRay [](https://travis-ci.org/rubychan/coderay)
## About
CodeRay is a Ruby library for syntax highlighting.
You put your code in, and you get it back colored; Keywords, strings, floats, comments - all in different colors. And with line numbers.
## Installation
`gem install coderay`
### Dependencies
CodeRay needs Ruby 1.8.7+ or 1.9.2+. It also runs on Rubinius and JRuby.
## Example Usage
```ruby
require 'coderay'
html = CodeRay.scan("puts 'Hello, world!'", :ruby).div(:line_numbers => :table)
````
## Documentation
See [http://coderay.rubychan.de/doc/](http://coderay.rubychan.de/doc/).
|