Class: Rodauth::Configuration
- Inherits:
-
Object
- Object
- Rodauth::Configuration
- Defined in:
- lib/rodauth.rb
Instance Attribute Summary collapse
-
#auth ⇒ Object
readonly
Returns the value of attribute auth.
Instance Method Summary collapse
- #enable(*features) ⇒ Object
-
#initialize(auth, &block) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(auth, &block) ⇒ Configuration
Returns a new instance of Configuration.
205 206 207 208 209 210 |
# File 'lib/rodauth.rb', line 205 def initialize(auth, &block) @auth = auth load_feature(:base) instance_exec(&block) auth.allocate.post_configure end |
Instance Attribute Details
#auth ⇒ Object (readonly)
Returns the value of attribute auth.
203 204 205 |
# File 'lib/rodauth.rb', line 203 def auth @auth end |
Instance Method Details
#enable(*features) ⇒ Object
212 213 214 215 216 |
# File 'lib/rodauth.rb', line 212 def enable(*features) new_features = features - @auth.features new_features.each{|f| load_feature(f)} @auth.features.concat(new_features) end |