Sha256: 7b90d27a06f89fb26a7d53a315b42ffb988617fe26dcb57e72e072a73e0ae8f1

Contents?: true

Size: 404 Bytes

Versions: 393

Compression:

Stored size: 404 Bytes

Contents

require 'puppet/confine'

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

  def pass?(value)
    # Double negate, so we only get true or false.
    ! ! value
  end

  def message(value)
    "false value when expecting true"
  end

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

Version data entries

393 entries across 393 versions & 3 rubygems

Version Path
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/confine/true.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/confine/true.rb
puppet-6.2.0 lib/puppet/confine/true.rb
puppet-6.2.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-6.2.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-6.2.0-universal-darwin lib/puppet/confine/true.rb
puppet-6.0.5 lib/puppet/confine/true.rb
puppet-6.0.5-x86-mingw32 lib/puppet/confine/true.rb
puppet-6.0.5-x64-mingw32 lib/puppet/confine/true.rb
puppet-6.0.5-universal-darwin lib/puppet/confine/true.rb
puppet-5.5.10 lib/puppet/confine/true.rb
puppet-5.5.10-x86-mingw32 lib/puppet/confine/true.rb
puppet-5.5.10-x64-mingw32 lib/puppet/confine/true.rb
puppet-5.5.10-universal-darwin lib/puppet/confine/true.rb
puppet-6.1.0 lib/puppet/confine/true.rb
puppet-6.1.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-6.1.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-6.1.0-universal-darwin lib/puppet/confine/true.rb
puppet-6.0.4 lib/puppet/confine/true.rb
puppet-6.0.4-x86-mingw32 lib/puppet/confine/true.rb