Sha256: 6806fe5960b8968317a461712e8e139f0e7985628c1cf5efc1b31399e0068224

Contents?: true

Size: 479 Bytes

Versions: 20

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true
require_relative '../../puppet/confine/boolean'

class Puppet::Confine::False < Puppet::Confine
  include Puppet::Confine::Boolean

  def passing_value
    false
  end

  def self.summarize(confines)
    confines.inject(0) { |count, confine| count + confine.summary }
  end

  def pass?(value)
    ! value
  end

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

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/confine/false.rb
puppet-8.3.0-x86-mingw32 lib/puppet/confine/false.rb
puppet-8.3.0-x64-mingw32 lib/puppet/confine/false.rb
puppet-8.3.0-universal-darwin lib/puppet/confine/false.rb
puppet-8.3.1 lib/puppet/confine/false.rb
puppet-8.3.1-x86-mingw32 lib/puppet/confine/false.rb
puppet-8.3.1-x64-mingw32 lib/puppet/confine/false.rb
puppet-8.3.1-universal-darwin lib/puppet/confine/false.rb
puppet-8.2.0 lib/puppet/confine/false.rb
puppet-8.2.0-x86-mingw32 lib/puppet/confine/false.rb
puppet-8.2.0-x64-mingw32 lib/puppet/confine/false.rb
puppet-8.2.0-universal-darwin lib/puppet/confine/false.rb
puppet-8.1.0 lib/puppet/confine/false.rb
puppet-8.1.0-x86-mingw32 lib/puppet/confine/false.rb
puppet-8.1.0-x64-mingw32 lib/puppet/confine/false.rb
puppet-8.1.0-universal-darwin lib/puppet/confine/false.rb
puppet-8.0.1 lib/puppet/confine/false.rb
puppet-8.0.1-x86-mingw32 lib/puppet/confine/false.rb
puppet-8.0.1-x64-mingw32 lib/puppet/confine/false.rb
puppet-8.0.1-universal-darwin lib/puppet/confine/false.rb