Module: Kameleoon::Utils

Defined in:
lib/kameleoon/utils.rb

Overview

Utils is a helper module for project

Defined Under Namespace

Modules: HashDouble, Strval, VisitorCode

Constant Summary collapse

ALPHA_NUMERIC_CHARS =
'ABCDEF0123456789'

Class Method Summary collapse

Class Method Details

.generate_random_string(length) ⇒ Object



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

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