Class: Another::Ldap::Proxy::Conf
- Inherits:
-
Object
- Object
- Another::Ldap::Proxy::Conf
- Extended by:
- Forwardable
- Defined in:
- lib/another/ldap/proxy/conf.rb
Instance Attribute Summary collapse
-
#conf ⇒ Object
readonly
Returns the value of attribute conf.
Class Method Summary collapse
Instance Method Summary collapse
- #debug ⇒ Object
-
#initialize(conf) ⇒ Conf
constructor
A new instance of Conf.
Constructor Details
#initialize(conf) ⇒ Conf
Returns a new instance of Conf.
15 16 17 |
# File 'lib/another/ldap/proxy/conf.rb', line 15 def initialize(conf) @conf = conf end |
Instance Attribute Details
#conf ⇒ Object (readonly)
Returns the value of attribute conf.
13 14 15 |
# File 'lib/another/ldap/proxy/conf.rb', line 13 def conf @conf end |
Class Method Details
.from_file(conf_file) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/another/ldap/proxy/conf.rb', line 23 def self.from_file(conf_file) raise "Configuration file not found: #{conf_file}" unless File.exist?(conf_file) conf_data = YAML.safe_load_file(conf_file, symbolize_names: true) new(conf_data) end |
Instance Method Details
#debug ⇒ Object
19 20 21 |
# File 'lib/another/ldap/proxy/conf.rb', line 19 def debug conf[:debug] end |