Class: SecureToken

Inherits:
String
  • Object
show all
Defined in:
lib/sixarm_ruby_secure_token.rb

Constant Summary

COUNT =
32
CHARS =
['a','b','c','d','e','f','g','h','j','k','m','n','p','r','s','t','u','v','w','x','y','z']

Instance Method Summary (collapse)

Constructor Details

- (SecureToken) initialize

Returns a new instance of SecureToken



23
24
25
# File 'lib/sixarm_ruby_secure_token.rb', line 23

def initialize
  super(Array.new(COUNT){CHARS[SecureRandom.random_number(CHARS.size)]}.join)
end