Class: Rodauth::Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/rodauth.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject (readonly)

Returns the value of attribute configuration.



378
379
380
# File 'lib/rodauth.rb', line 378

def configuration
  @configuration
end

.configuration_nameObject (readonly)

Returns the value of attribute configuration_name.



377
378
379
# File 'lib/rodauth.rb', line 377

def configuration_name
  @configuration_name
end

.featuresObject (readonly)

Returns the value of attribute features.



374
375
376
# File 'lib/rodauth.rb', line 374

def features
  @features
end

.roda_classObject

Returns the value of attribute roda_class.



373
374
375
# File 'lib/rodauth.rb', line 373

def roda_class
  @roda_class
end

.route_hashObject

Returns the value of attribute route_hash.



376
377
378
# File 'lib/rodauth.rb', line 376

def route_hash
  @route_hash
end

.routesObject (readonly)

Returns the value of attribute routes.



375
376
377
# File 'lib/rodauth.rb', line 375

def routes
  @routes
end

Class Method Details

.configure(&block) ⇒ Object



394
395
396
# File 'lib/rodauth.rb', line 394

def self.configure(&block)
  @configuration.apply(&block)
end

.freezeObject



398
399
400
401
402
403
# File 'lib/rodauth.rb', line 398

def self.freeze
  @features.freeze
  @routes.freeze
  @route_hash.freeze
  super
end

.inherited(subclass) ⇒ Object



381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/rodauth.rb', line 381

def self.inherited(subclass)
  super
  superclass = self
  subclass.instance_exec do
    @roda_class = superclass.roda_class
    @features = superclass.features.clone
    @routes = superclass.routes.clone
    @route_hash = superclass.route_hash.clone
    @configuration = superclass.configuration.clone
    @configuration.instance_variable_set(:@auth, self)
  end
end