A good starting point is studying the rools.rb example.
The next step would be to browse the unit tests. They show all the aspects of the inference engine.
If you get lost in the terminology, you can consult the glossary
Note : Rools is developed and tested on MacOSX (ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.3], this environment was built following the fine instructions from Dan Benjamin at Hivelogic)
Following the Rake tradition, you can run the unit tests from your openwfe-ruby tree with
You can run tests one at a time with
rake test TEST=test/facts_test.rb
rake specsor if you want full coverage analysis with:
rake rcovThis will generate the coverage report and the specifcation report
ruby 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.9.0] rake, version 0.7.2 Rails 1.2.3 *** LOCAL GEMS *** rspec (1.0.5, 1.0.0) RSpec-1.0.5 (r2081) - BDD for Ruby http://rspec.rubyforge.org/ *** LOCAL GEMS *** rubygems-update (0.9.2) RubyGems Update GEM *** LOCAL GEMS *** rote (0.3.4) Adds template-based doc support to Rake. *** LOCAL GEMS *** RedCloth (3.0.4) RedCloth is a module for using Textile and Markdown in Ruby. Textile and Markdown are text formats. A very simple text format. Another stab at making readable text that can be converted to HTML. *** LOCAL GEMS *** syntax (1.0.0) Syntax is Ruby library for performing simple syntax highlighting. *** LOCAL GEMS *** rcov (0.8.0.2) Code coverage analysis tool for Ruby *** LOCAL GEMS *** ZenTest (3.6.0) ZenTest provides 4 different tools and 1 library: zentest, unit_diff, autotest, multiruby, and Test::Rails.