Method: Random::StringExtensions#shuffle

Defined in:
lib/garcon/core_ext/random.rb

#shuffle(separator = //) ⇒ Object

Return the string with seperated sections arranged in a random order. The default seperation is by character.

Examples:

"Ruby rules".shuffle  # => "e lybRsuur"


480
481
482
# File 'lib/garcon/core_ext/random.rb', line 480

def shuffle(separator = //)
  split(separator).shuffle.join('')
end