Method: CVTool.generate_token

Defined in:
lib/cv_tool.rb

.generate_token(length = Constants::GT_LENGTH) ⇒ Object



14
15
16
17
18
# File 'lib/cv_tool.rb', line 14

def generate_token(length = Constants::GT_LENGTH)
  chars = Array('A'..'Z') + Array('a'..'z') + Array(0..9)
  token = Array.new(length) { chars.sample }.join
  return token
end