Class: Warden::Ldap::Configuration
- Inherits:
-
Object
- Object
- Warden::Ldap::Configuration
- Defined in:
- lib/warden/ldap/configuration.rb
Overview
Stores configruation information
Configruation inforamtion is loaded from a configuration block defined within the client application.
Class Method Summary collapse
Instance Method Summary collapse
- #env ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
33 34 35 |
# File 'lib/warden/ldap/configuration.rb', line 33 def initialize @logger ||= Warden::Ldap::Logger end |
Class Method Details
.define_setting(name) ⇒ Object
17 18 19 20 |
# File 'lib/warden/ldap/configuration.rb', line 17 def define_setting(name) defined_settings << name attr_accessor name end |
.defined_settings ⇒ Object
22 23 24 |
# File 'lib/warden/ldap/configuration.rb', line 22 def defined_settings @defined_settings ||= [] end |
Instance Method Details
#env ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/warden/ldap/configuration.rb', line 37 def env if defined? Rails Rails.env elsif @env.nil? raise 'Must define Warden::Ldap.env' end @env end |