class Rodauth::Configuration
def enable(*features)
def enable(*features) new_features = features - @auth.features new_features.each{|f| load_feature(f)} @auth.features.concat(new_features) end
def initialize(auth, &block)
def initialize(auth, &block) @auth = auth load_feature(:base) instance_exec(&block) auth.allocate.post_configure end
def load_feature(feature_name)
def load_feature(feature_name) require "rodauth/features/#{feature_name}" feature = FEATURES[feature_name] enable(*feature.dependencies) extend feature.configuration @auth.routes.concat(feature.routes) @auth.send(:include, feature) end