Sha256: cd988cc4bdc83e7983f8c391570ac6b97f3e89fc380a773535a4a3c5a3f4c349

Contents?: true

Size: 428 Bytes

Versions: 20

Compression:

Stored size: 428 Bytes

Contents

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

class Puppet::Confine::Feature < Puppet::Confine
  def self.summarize(confines)
    confines.collect { |c| c.values }.flatten.uniq.find_all { |value| ! confines[0].pass?(value) }
  end

  # Is the named feature available?
  def pass?(value)
    Puppet.features.send(value.to_s + "?")
  end

  def message(value)
    "feature #{value} is missing"
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

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