Frequency
Frequency is a small dsl written in ruby to work with frequency events (never, sometimes, always..)
Examples
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
alwais do
puts "bye"
end
Copyright
Copyright © 2010 Tiago Peczenyj. See LICENSE for details.