Sha256: 9f3e13e832927e367f5508f679d17ec18cb44c61b2bd04a1b31c284384e9b531

Contents?: true

Size: 445 Bytes

Versions: 5

Compression:

Stored size: 445 Bytes

Contents

# Methods to help with handling warnings.
module Puppet::Util::Warnings
    module_function

    def warnonce(msg)
        $stampwarnings ||= {}
        $stampwarnings[self.class] ||= []
        unless $stampwarnings[self.class].include? msg
            Puppet.warning msg
            $stampwarnings[self.class] << msg
        end

        return nil
    end

    def clear_warnings()
        $stampwarnings = {}
        return nil
    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
puppet-0.24.9 lib/puppet/util/warnings.rb
puppet-0.24.5 lib/puppet/util/warnings.rb
puppet-0.24.6 lib/puppet/util/warnings.rb
puppet-0.24.7 lib/puppet/util/warnings.rb
puppet-0.24.8 lib/puppet/util/warnings.rb