Frequency is a small dsl written in ruby to work with frequency events (never, sometimes, always..)
Frequency is easy to use
require 'rubygems' require 'frequency' include Frequency sometimes do puts "sometimes you can see this times, sometimes not" end never do puts "this line never will be print" end rarely :with_probability => 0.01 do puts "ok, its very rare..." end normally :with_probability => '24%' do puts "you can use strings instead float numbers" end always do puts "bye" end
the option with_probability does not work with never and always.
[sudo] gem install frequency-dsl
Copyright © 2010 Tiago Peczenyj. See LICENSE for details.