lib/dotini/ini_file.rb
# Represents the current INI file as a hash
Represents the current INI file as a hash
Represents the current INI file as a hash
def to_h
      {}.tap do |hash|
        sections.each do |section|
          section.to_h.then do |section_hash|
            next if section_hash.empty?
            (hash[section.name] ||= {}).merge! section_hash
          end
        end
      end
    end
def to_h { } . tap do | hash | sections . each do | section | section . to_h . then do | section_hash | next if section_hash . empty? ( hash [ section . name ] ||= { } ) . merge! section_hash end end end end
Represents the current INI file as a hash
Represents the current INI file as a hash