Sha256: 5d20956ac9920dcc71c4afbea7ff4fcf6900f0e9e9b7b82c2874175ef4ad321e
Contents?: true
Size: 459 Bytes
Versions: 5
Compression:
Stored size: 459 Bytes
Contents
require 'entrance/controller' require 'entrance/model' require 'entrance/ciphers' require 'entrance/config' require 'digest/sha1' module Entrance def self.config @config ||= Config.new end def self.configure yield config config.validate! end def self.model @model ||= config.model.constantize end def self.generate_token(length = 40) str = Digest::SHA1.hexdigest([Time.now, rand].join) str[0..(length-1)] end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
entrance-0.3.2 | lib/entrance.rb |
entrance-0.3.0 | lib/entrance.rb |
entrance-0.2.5 | lib/entrance.rb |
entrance-0.2.4 | lib/entrance.rb |
entrance-0.2.3 | lib/entrance.rb |