cartodb-4.42/spec/support/string_extension.rb
2024-04-06 05:25:13 +00:00

9 lines
163 B
Ruby

class String
@@chars ||= ('a'..'z').to_a + ('A'..'Z').to_a
def self.random(size = 8)
(0..size).map{ @@chars[rand(@@chars.length)] }.join
end
end