Sha256: e49ca17eb81ed71539fb2dfd7d2c3ac4eee14081c46496e3c1d6a611ff760a63

Contents?: true

Size: 484 Bytes

Versions: 240

Compression:

Stored size: 484 Bytes

Contents

require '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

240 entries across 240 versions & 1 rubygems

Version Path
puppet-6.29.0 lib/puppet/confine/true.rb
puppet-6.29.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-6.29.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-6.29.0-universal-darwin lib/puppet/confine/true.rb
puppet-6.28.0 lib/puppet/confine/true.rb
puppet-6.28.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-6.28.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-6.28.0-universal-darwin lib/puppet/confine/true.rb
puppet-6.27.0 lib/puppet/confine/true.rb
puppet-6.27.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-6.27.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-6.27.0-universal-darwin lib/puppet/confine/true.rb
puppet-6.26.0 lib/puppet/confine/true.rb
puppet-6.26.0-x86-mingw32 lib/puppet/confine/true.rb
puppet-6.26.0-x64-mingw32 lib/puppet/confine/true.rb
puppet-6.26.0-universal-darwin lib/puppet/confine/true.rb
puppet-6.25.1 lib/puppet/confine/true.rb
puppet-6.25.1-x86-mingw32 lib/puppet/confine/true.rb
puppet-6.25.1-x64-mingw32 lib/puppet/confine/true.rb
puppet-6.25.1-universal-darwin lib/puppet/confine/true.rb