Module: FatCore::String::ClassMethods

Included in:
String
Defined in:
lib/fat_core/string.rb

Generating collapse

Instance Method Details

#random(size = 8) ⇒ Object

Return a random string composed of all lower-case letters of length size

[View source]

422
423
424
# File 'lib/fat_core/string.rb', line 422

def random(size = 8)
  ('a'..'z').cycle.take(size).shuffle.join
end