Sha256: 60cc0f4b58b7600ba6b97f76166e35c31bfc17fbed3f9261889dade2c6751254

Contents?: true

Size: 528 Bytes

Versions: 28

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

require_relative '../../puppet/confine/boolean'

class Puppet::Confine::True < Puppet::Confine
  include Puppet::Confine::Boolean

  def passing_value
    true
  end

  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

28 entries across 28 versions & 1 rubygems

Version Path
puppet-8.10.0 lib/puppet/confine/true.rb
puppet-8.10.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-8.10.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-8.10.0-universal-darwin lib/puppet/confine/true.rb
puppet-8.9.0 lib/puppet/confine/true.rb
puppet-8.9.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-8.9.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-8.9.0-universal-darwin lib/puppet/confine/true.rb
puppet-8.8.1 lib/puppet/confine/true.rb
puppet-8.8.1-x86-mingw32 lib/puppet/confine/true.rb
puppet-8.8.1-x64-mingw32 lib/puppet/confine/true.rb
puppet-8.8.1-universal-darwin lib/puppet/confine/true.rb
puppet-8.7.0 lib/puppet/confine/true.rb
puppet-8.7.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-8.7.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-8.7.0-universal-darwin lib/puppet/confine/true.rb
puppet-8.6.0 lib/puppet/confine/true.rb
puppet-8.6.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-8.6.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-8.6.0-universal-darwin lib/puppet/confine/true.rb