class IniParse::SectionCollection
IniParse::Lines::Section#merge!).
collection, the existing section is merged with the new one (see
once, if SectionCollection encounters a Section key already held in the
Since it is assumed that an INI document will only represent a section
instances contained within a Section.
A implementation of LineCollection used for storing (mostly) Option
def <<(line)
def <<(line) if line.kind_of?(IniParse::Lines::Option) || (has_key?('__anonymous__') && (line.blank? || line.kind_of?(IniParse::Lines::Comment))) option = line line = IniParse::Lines::AnonymousSection.new line.lines << option if option end if line.blank? || (! has_key?(line.key)) super # Adding a new section, comment or blank line. else self[line.key].merge!(line) end self end