Sha256: e33bc8939059f3715c2416661fb68cdfb299cf01278fd44cd2838d64e6baf01d
Contents?: true
Size: 514 Bytes
Versions: 1
Compression:
Stored size: 514 Bytes
Contents
require 'entrance/controller' require 'entrance/model' require 'entrance/ciphers' require 'entrance/config' require 'active_support/core_ext/numeric/time' 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 = SecureRandom.hex(length/2) return str unless str.respond_to?(:encode) str.encode('UTF-8') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
entrance-0.2.1 | lib/entrance.rb |