Method: Random::StringExtensions#at_rand

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

#at_rand(separator = //) ⇒ Object

Return a random separation of the string. Default separation is by charaacter.

Examples:

"Ruby rules".at_rand(' ')  # => ["Ruby"]


421
422
423
# File 'lib/garcon/core_ext/random.rb', line 421

def at_rand(separator = //)
  self.split(separator, -1).at_rand
end