# Radius 0.0.2 -- Powerful Tag-Based Templates

**URL:** <https://www.ruby-forum.com/t/radius-0-0-2-powerful-tag-based-templates/53840>\
**Category:** Ruby\
**Created:** [February 15, 2006, 4:22am UTC](https://www.ruby-forum.com/t/radius-0-0-2-powerful-tag-based-templates/53840 "2006-02-15T04:22:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_WSLong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Post date:** [February 15, 2006, 4:22am UTC](https://www.ruby-forum.com/t/radius-0-0-2-powerful-tag-based-templates/53840/1 "2006-02-15T04:22:58Z")

</div>

Things have stabilized enough to release Radius 0.0.2. This release  
contains a couple of minor refactorings.

## What’s New?

- Refactored Parser to use Context#render\_tag instead of #send when  
rendering tags defined on a Context.

- UndefinedTagError is now thrown when the parser tries to render a tag  
which doesn’t exist on a context.

- Added Context#tag\_missing which works like method\_method missing on  
Object, but is tag specific.

## What is Radius?

A small, but powerful tag-based template language for Ruby similar to  
the ones used in MovableType and TextPattern. It has tags similar to  
HTML or XML, but can be used to generate any form of plain text (not  
just HTML).

Installation:  
% gem install radius

Download:  
[http://rubyforge.org/frs/?group\_id=1262](http://rubyforge.org/frs/?group_id=1262)

Documentation:  
[http://radius.rubyforge.org](http://radius.rubyforge.org)

A small example of Radius in action:

class ThreeStoogesContext \< Radius::Context  
def initialize  
@prefix = ‘ts’  
end  
def stooge(attr)  
content = ‘’  
[“Larry”, “Moe”, “Curly”].each do |name|  
@name = name  
content \<\< yield  
end  
content  
end  
def name(attr)  
@name  
end  
end

parser = Radius::Parser.new(ThreeStoogesContext.new)

template = \<\<-TEMPLATE

- 

 TEMPLATE

puts parser.parse(template)

This will output:

```
 <li>Larry</li>

 <li>Moe</li>

 <li>Curly</li>

```

Learn more by reading the Quick Start guide:  
[http://radius.rubyforge.org/files/QUICKSTART.html](http://radius.rubyforge.org/files/QUICKSTART.html)

Enjoy!
