lib/rantly/generator.rb in rantly-0.2.0 vs lib/rantly/generator.rb in rantly-0.3.0
- old
+ new
@@ -202,12 +202,12 @@
pos -= weight
end
end
end
- def array(*freq_pairs)
+ def array(n=self.size,&block)
acc = []
- self.size.times { acc << freq(*freq_pairs) }
+ n.times { acc << self.instance_eval(&block) }
acc
end
module Chars