Clone this wiki locally
A Complete In Code Annotations System
by Trans and George Moschovitis
Annotations provides a complete and easy to use system of annotating methods and arbitrary objects. The annotations are defined in-code,not in comments, so it is fully reflective without any preproccessing.
Version 2.0+ is a major simplification over 1.0 series. Overall speed is much faster and the notation more consistent. Where before one would use “ann.attr_name.ann_name”, now it’s ann(:attr_name, :ann_name). This change was inspired by Ara T. Howard.
class X attr :foo, String, :default => "bar" end X.ann :foo, :class #=> String X.ann :foo, :default #=> "bar" X.ann :foo, :default => "baz" X.ann :foo, :default #=> "baz"
You can install either via Rubygems.
gem install anise
Or a tarball.
tar -xvzf anise-2.0.tar.gz cd anise-2.0 sudo ruby setup.rb
Please see API Reference for additional details.
- Trans [Implementation]
- George Moschovitis [Original Concept]
- Ara T. Howard [Suggestions]
Copyright © 2004-2009 Thomas Sawyer, George Moschovitis
Distributed under the Ruby/GPL dual-license.