Sha256: 9de384cfad509511dc3bffe29bd67d299bedcafc5cf7651a66624ac532045c09
Contents?: true
Size: 306 Bytes
Versions: 4
Compression:
Stored size: 306 Bytes
Contents
class RandString SALT_CHARS = %w{a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9 0 _ % $ @ ! " ' . , < > } def self.make_random_string(len) rc = "" len.times{ rc << SALT_CHARS[rand(SALT_CHARS.size)] } rc end end
Version data entries
4 entries across 4 versions & 1 rubygems