Module: Appoxy::Utils

Defined in:
lib/utils.rb

Class Method Summary collapse

Class Method Details

.random_string(length = 10) ⇒ Object



3
4
5
6
7
8
# File 'lib/utils.rb', line 3

def self.random_string(length=10)
  chars    = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'
  password = ''
  length.times { password << chars[rand(chars.size)] }
  password
end