Class: Avmtrf1::Ini
- Inherits:
-
Object
- Object
- Avmtrf1::Ini
- Includes:
- EacRubyUtils::SimpleCache
- Defined in:
- lib/avmtrf1/ini.rb,
lib/avmtrf1/ini/profile.rb
Overview
Leitor de arquivos .ini com suporte a herança de seções/perfis.
Defined Under Namespace
Classes: Profile
Constant Summary collapse
- SECTION_NAME_PATTERN =
/\A([^\:]+)(?:\:([^\:]+))?\z/.freeze
Instance Attribute Summary collapse
-
#inifile ⇒ Object
readonly
Returns the value of attribute inifile.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(inifile) ⇒ Ini
constructor
A new instance of Ini.
Constructor Details
Instance Attribute Details
#inifile ⇒ Object (readonly)
Returns the value of attribute inifile.
25 26 27 |
# File 'lib/avmtrf1/ini.rb', line 25 def inifile @inifile end |
Class Method Details
.parse_section_name(section_name) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/avmtrf1/ini.rb', line 17 def parse_section_name(section_name) m = SECTION_NAME_PATTERN.match(section_name) return [m[1], m[2]] if m raise "Section name pattern \"#{SECTION_NAME_PATTERN}\" not match \"#{section_name}\"" end |