Sha256: 0f3e6f29ae8f970e35c062325b1dc6ff54c0d1e6483521780037b3e3c4883dfb

Contents?: true

Size: 492 Bytes

Versions: 539

Compression:

Stored size: 492 Bytes

Contents

class Puppet::Confine::Any < Puppet::Confine
  def self.summarize(confines)
    confines.inject(0) { |count, confine| count + confine.summary }
  end

  def pass?(value)
    !! value
  end

  def message(value)
    "0 confines (of #{value.length}) were true"
  end

  def summary
    result.find_all { |v| v == true }.length
  end

  def valid?
    if @values.any? { |value| pass?(value) }
      true
    else
      Puppet.debug("#{label}: #{message(@values)}")
      false
    end
  end
end

Version data entries

539 entries across 539 versions & 3 rubygems

Version Path
puppet-5.5.16 lib/puppet/confine/any.rb
puppet-5.5.16-x86-mingw32 lib/puppet/confine/any.rb
puppet-5.5.16-x64-mingw32 lib/puppet/confine/any.rb
puppet-5.5.16-universal-darwin lib/puppet/confine/any.rb
puppet-6.6.0 lib/puppet/confine/any.rb
puppet-6.6.0-x86-mingw32 lib/puppet/confine/any.rb
puppet-6.6.0-x64-mingw32 lib/puppet/confine/any.rb
puppet-6.6.0-universal-darwin lib/puppet/confine/any.rb
puppet-6.5.0 lib/puppet/confine/any.rb
puppet-6.5.0-x86-mingw32 lib/puppet/confine/any.rb
puppet-6.5.0-x64-mingw32 lib/puppet/confine/any.rb
puppet-6.5.0-universal-darwin lib/puppet/confine/any.rb
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/confine/any.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/confine/any.rb
puppet-6.4.2 lib/puppet/confine/any.rb
puppet-6.4.2-x86-mingw32 lib/puppet/confine/any.rb
puppet-6.4.2-x64-mingw32 lib/puppet/confine/any.rb
puppet-6.4.2-universal-darwin lib/puppet/confine/any.rb
puppet-6.0.9 lib/puppet/confine/any.rb
puppet-6.0.9-x86-mingw32 lib/puppet/confine/any.rb