how to create random object  to a particular ruby object ?

for example i want like this

rand(Fixnum)   --> 345 (randomly)
rand(Float)    --> 3877.5545(randomly)
rand(String)   --> "sfskgksf" (randomly)
rand(boolean)  --> 0(randomly)

any idea ?
-- 
Posted via http://www.ruby-forum.com/.