Created
March 25, 2009 15:01
-
-
Save reborg/85515 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$:.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