# Anise v0.4.0 released

**URL:** <https://www.ruby-forum.com/t/anise-v0-4-0-released/169065>\
**Category:** Ruby\
**Created:** [May 28, 2009, 10:34pm UTC](https://www.ruby-forum.com/t/anise-v0-4-0-released/169065 "2009-05-28T22:34:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 28, 2009, 10:34pm UTC](https://www.ruby-forum.com/t/anise-v0-4-0-released/169065/1 "2009-05-28T22:34:49Z")

</div>

= Anise

[http://anise.rubyforge.org](http://anise.rubyforge.org)

== INTRODUCTION

Anise is an Annotations Systems for the Ruby programming language.  
Unlike most other annotations systems it is not a comment-based system,  
or a “macro” system that sits over-and-above the rest of the code.  
Rather, Anise is a dynamic annotations system operating at runtime.

Anise is a spin off of the old Facets annotations.rb library. It  
includes the Annotations functionality, and adds a mixin, Annotator,  
that makes it easy to add new annotations on the fly.

== RELEASE NOTES

This version adds a callback method called #annotation\_added. It is very  
basic and patterned after Ruby’s other built-in callback methods.

### 0.4.0 // 2009-05-27

1 Major Enhancement

- Added annotation\_added callback.

== INSTALLATION

To install with RubyGems simply open a console and type:

gem install anise

To manually install you will need Setup.rb (see  
[http://setup.rubyforge.org](http://setup.rubyforge.org)). Then download the tarball package and do:

$ tar -xvzf anise-0.2.0.tgz  
$ cd anise-0.2.0  
$ sudo setup.rb all

== USAGE

The following example briefly demonstrates all three major features.

require ‘anise’

class X

```
 include Anise

 # Annotations

 ann :grape, :class=>String

 # Annotators

 annotator :doc

 doc "This is an entry."

 def bar
   # ...
 end

 # Annotated Attributes

 attr :baz, Integer, :max => 10

```

end

Looking at the resulting annotations:

X.ann(:foo) #=\> {:class=\>String}  
X.ann(:bar) #=\> {:doc=\>“This is an entry.”}  
X.ann(:baz) #=\> {:class=\>Integer, :max=\>10}

The Anise library can be used as a whole, per the example above, or  
these features can be used separately. For more details see the RDoc API  
documentation.

== TESTING

Turn is the recommended way to run Anise’s test suite  
([http://turn.rubyforge.org](http://turn.rubyforge.org)).

$ turn test/test\_\*

But a script +test/suite.rb+ script is include so you can easily run the  
unit tests with the testrb command:

$ testrb -Ilib test/suite.rb

or with Ruby alone:

$ ruby -Ilib -rtest/unit test/suite.rb

Anise also includes Quarry specifications. These can be run via:

$ quarry -v spec/

See Quarry project ([http://quarry.rubyforge.org](http://quarry.rubyforge.org)) for more informaiton.

== LICENSE

Copyright (c) 2008 TigerOps

This program is distributed under the terms of the LGPL License.

Please see COPYING file for details.
