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
328 def initialize(auth, &block)
329   @auth = auth
330   # :nocov:
331   # Only for backwards compatibility
332   # RODAUTH3: Remove
333   apply(&block) if block
334   # :nocov:
335 end

Public Instance methods

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