RNS::ConfigObj
A configuration file parser compatible with Python's configobj. Supports nested sections via bracket depth ([section], [[subsection]], etc.), key = value pairs, comments, list values, boolean/int/float coercion, and file I/O.
Constants
BOOLS = {"yes" => true, "no" => false, "on" => true, "off" => false, "1" => true, "0" => false, "true" => true, "false" => false}
Boolean map matching Python configobj._bools
KEYWORD_RE = /^\s*((?:".*?")|(?:'.*?')|(?:[^'"=].*?))\s*=\s*(.*)$/
Key = value regex
SECTION_RE = /^\s*((?:\[\s*)+)((?:".*?")|(?:'.*?')|(?:[^'"\s].*?))((?:\s*\])+)\s*(?:#.*)?$/
Section marker regex: matches [section], [[section]], etc.
Constructors
new
SourceInstance methods
[](*args, **options)
Source[](*args, **options, &)
Source[]=(*args, **options)
Source[]=(*args, **options, &)
Sourceadd_section(*args, **options)
Sourceadd_section(*args, **options, &)
Sourceas_bool(*args, **options)
Sourceas_bool(*args, **options, &)
Sourceas_float(*args, **options)
Sourceas_float(*args, **options, &)
Sourceas_int(*args, **options)
Sourceas_int(*args, **options, &)
Sourceas_list(*args, **options)
Sourceas_list(*args, **options, &)
Sourcedepth(*args, **options)
Sourcedepth(*args, **options, &)
Sourcefilename
Sourceget(*args, **options)
Sourceget(*args, **options, &)
Sourcehas_key?(*args, **options)
Sourcehas_key?(*args, **options, &)
Sourcescalars(*args, **options)
Sourcescalars(*args, **options, &)
Sourcesection(*args, **options)
Sourcesection(*args, **options, &)
Sourcesections(*args, **options)
Sourcesections(*args, **options, &)
Sourcesize(*args, **options)
Sourcesize(*args, **options, &)
Source