class Rodauth::Configuration

  1. lib/rodauth.rb
Superclass: Object

Methods

Public Class

  1. new

Public Instance

  1. apply
  2. auth
  3. enable

Attributes

auth [R]

Public Class methods

new(auth, &block)
[show source]
    # File lib/rodauth.rb
329 def initialize(auth, &block)
330   @auth = auth
331   # :nocov:
332   # Only for backwards compatibility
333   # RODAUTH3: Remove
334   apply(&block) if block
335   # :nocov:
336 end

Public Instance methods

apply(&block)
[show source]
    # File lib/rodauth.rb
338 def apply(&block)
339   load_feature(:base)
340   instance_exec(&block)
341 end
enable(*features)
[show source]
    # File lib/rodauth.rb
343 def enable(*features)
344   features.each do |feature|
345     next if @auth.features.include?(feature)
346     load_feature(feature)
347     @auth.features << feature
348   end
349 end