# File lib/puppet/util/inifile.rb, line 312 def add_section(name, file) get_physical_file(file).add_section(name) end
# File lib/puppet/util/inifile.rb, line 291 def each_file(&block) @files.keys.each do |path| yield path end end
# File lib/puppet/util/inifile.rb, line 283 def each_section(&block) @files.values.each do |file| file.sections.each do |section| yield section end end end
# File lib/puppet/util/inifile.rb, line 297 def get_section(name) sect = nil @files.values.each do |file| if (current = file.get_section(name)) sect = current end end sect end
# File lib/puppet/util/inifile.rb, line 308 def include?(name) !! get_section(name) end
Read and parse a file and store it in the collection. If the file has already been read it will be destroyed and re-read.
# File lib/puppet/util/inifile.rb, line 273 def read(file) new_physical_file(file).read end
# File lib/puppet/util/inifile.rb, line 277 def store @files.values.each do |file| file.store end end
# File lib/puppet/util/inifile.rb, line 267 def initialize @files = {} end