Class: OohAuth::KeyGenerators::Alphanum

Inherits:
String
  • Object
show all
Defined in:
lib/ooh-auth/key_generators.rb

Overview

A good ol’ fashioned incomprehensible string of alphanumeric characters.

Class Method Summary collapse

Class Method Details

.gen(len = 18) ⇒ Object



50
51
52
# File 'lib/ooh-auth/key_generators.rb', line 50

def self.gen(len=18)
  return((0..(len-1)).collect {|x| ALPHANUM[rand(ALPHANUM.length)] }.join(""))
end