Class: Puppet::Provider::Yumrepo::IniConfig::PhysicalFile
- Inherits:
-
Util::IniConfig::PhysicalFile
- Object
- Util::IniConfig::PhysicalFile
- Puppet::Provider::Yumrepo::IniConfig::PhysicalFile
- Defined in:
- lib/puppet/provider/yumrepo/inifile.rb
Overview
Examines a file on disk and identifies whether a section exists.
Instance Method Summary collapse
Instance Method Details
#store ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/puppet/provider/yumrepo/inifile.rb', line 9 def store unlinked = false if @destroy_empty && (sections.empty? || sections.all?(&:destroy?)) ::File.unlink(@file) unlinked = true elsif sections.any?(&:dirty?) text = self.format @filetype.write(text) end sections.each(&:mark_clean) unlinked end |