class OpenSSL::Config
def get_value(section, key)
#=> "bar"
config.get_value('default','foo')
and _key_ like so:
You can get a specific value from the config if you know the _section_
# foo=bar
#=> [ default ]
puts config.to_s
#=> #
config = OpenSSL::Config.load('foo.cnf')
Given the following configurating file being loaded:
Gets the value of _key_ from the given _section_
#
def get_value(section, key) if section.nil? raise TypeError.new('nil not allowed') end section = 'default' if section.empty? get_key_string(section, key) end