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-5.5.3-x86-mingw32 lib/puppet/confine/true.rb
puppet-5.5.3-x64-mingw32 lib/puppet/confine/true.rb
puppet-5.5.3-universal-darwin lib/puppet/confine/true.rb
bolt-0.21.2 vendored/puppet/lib/puppet/confine/true.rb
bolt-0.21.1 vendored/puppet/lib/puppet/confine/true.rb
puppet-5.5.2 lib/puppet/confine/true.rb
puppet-5.5.2-x86-mingw32 lib/puppet/confine/true.rb
puppet-5.5.2-x64-mingw32 lib/puppet/confine/true.rb
puppet-5.5.2-universal-darwin lib/puppet/confine/true.rb
puppet-5.3.7 lib/puppet/confine/true.rb
puppet-5.3.7-x86-mingw32 lib/puppet/confine/true.rb
puppet-5.3.7-x64-mingw32 lib/puppet/confine/true.rb
puppet-5.3.7-universal-darwin lib/puppet/confine/true.rb
puppet-4.10.12 lib/puppet/confine/true.rb
puppet-4.10.12-x86-mingw32 lib/puppet/confine/true.rb
puppet-4.10.12-x64-mingw32 lib/puppet/confine/true.rb
puppet-4.10.12-universal-darwin lib/puppet/confine/true.rb
bolt-0.21.0 vendored/puppet/lib/puppet/confine/true.rb
bolt-0.20.7 vendored/puppet/lib/puppet/confine/true.rb
bolt-0.20.6 vendored/puppet/lib/puppet/confine/true.rb