Radio Graph plugin

Plugin details

Radiograph is a small Rails plugin to expose Ultraviolet to Rails views.
Ultraviolet is a syntax highlighting library which makes use of Textpow which parses Textmate bundles (whew!). This plugin lets you use Ultraviolet's syntax highlighting capabilities in Rails applications. It parses a Textmate syntax and generates HTML based on a Textmate theme.

Websitehttp://www.jeremymcanally.com/ Repositoryhttp://code.jeremymcanally.com/radiograph Author Jeremy McAnally Tags graph LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://code.jeremymcanally.com/radiograph

You can use it in views like so:

  <%= code("show_menu if current_user") %>


The default theme is 'all_hallows_eve' and the default syntax is 'ruby.' The above snippet would generate some simple XHTML that syntax highlights the code show. If you don't want to type code(), you can use the convenience alias: c().

  <%= c("my_value ? puts 'Good!' : puts 'Oh noez!'", :theme => 'amy') %>


Note that this example changes the default theme (learn more about the parameters to Radiograph#code in its documentation).

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: scott, about 1 year ago