Class: ScoutApm::Utils::UniqueId

Inherits:
Object
  • Object
show all
Defined in:
lib/scout_apm/utils/unique_id.rb

Constant Summary collapse

ALPHABET =
('a'..'z').to_a.freeze

Class Method Summary collapse

Class Method Details

.simple(length = 16) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/scout_apm/utils/unique_id.rb', line 6

def self.simple(length=16)
  s = ""
  length.times do
      s << ALPHABET[rand(26)]
  end
  s
end