Skip to content
A small dsl written in ruby to work with frequency events (never, sometimes, always..)
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
rdoc
spec
LICENSE
README.rdoc
Rakefile
VERSION

README.rdoc

Frequency

Frequency is a small dsl written in ruby to work with frequency events (never, sometimes, always..)

Examples

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.

Install

[sudo] gem install frequency-dsl

Copyright

Copyright © 2010 Tiago Peczenyj. See LICENSE for details.

You can’t perform that action at this time.