Module: Kameleoon::Utils

Defined in:
lib/kameleoon/utils.rb

Overview

Utils is a helper module for project

Defined Under Namespace

Modules: Domain, HashDouble, Strval, VisitorCode

Constant Summary collapse

ALPHA_NUMERIC_CHARS =
'ABCDEF0123456789'

Class Method Summary collapse

Class Method Details

.generate_random_string(length) ⇒ Object



14
15
16
# File 'lib/kameleoon/utils.rb', line 14

def self.generate_random_string(length)
  (1..length).map { ALPHA_NUMERIC_CHARS[rand(ALPHA_NUMERIC_CHARS.length)] }.join
end