Class: Array

Inherits:
Object show all
Defined in:
lib/druid/Array.rb

Instance Method Summary collapse

Instance Method Details

#shuffle(times = 1) ⇒ Object



2
3
4
5
6
# File 'lib/druid/Array.rb', line 2

def shuffle(times = 1)
	(0...times).each {|shuffle|
		(0...self.size).each {|i| self.insert(rand(self.size), self.delete_at(i)) } 
	}
end