Skip to content

Instantly share code, notes, and snippets.

@reborg
Created March 25, 2009 15:01
Show Gist options
  • Save reborg/85515 to your computer and use it in GitHub Desktop.
Save reborg/85515 to your computer and use it in GitHub Desktop.
$:.unshift File.join('.','radius/lib')
require 'radius'
context = Radius::Context.new do |c|
c.define_tag 'hello' do
'Hello world'
end
end
parser = Radius::Parser.new(context, :tag_prefix => 'r')
parsed = parser.parse("A small example: <r:hello />!")
puts parsed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment