Sha256: 939581561fb6a50d834db630f7885bd6c99cfb7de43f180759c5daae24c710bc

Contents?: true

Size: 482 Bytes

Versions: 120

Compression:

Stored size: 482 Bytes

Contents

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

class Puppet::Confine::Exists < Puppet::Confine
  def self.summarize(confines)
    confines.inject([]) { |total, confine| total + confine.summary }
  end

  def pass?(value)
    value && (for_binary? ? which(value) : Puppet::FileSystem.exist?(value))
  end

  def message(value)
    "file #{value} does not exist"
  end

  def summary
    result.zip(values).inject([]) { |array, args| val, f = args; array << f unless val; array }
  end
end

Version data entries

120 entries across 120 versions & 1 rubygems

Version Path
puppet-7.34.0 lib/puppet/confine/exists.rb
puppet-7.34.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.34.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.34.0-universal-darwin lib/puppet/confine/exists.rb
puppet-7.33.0 lib/puppet/confine/exists.rb
puppet-7.33.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.33.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.33.0-universal-darwin lib/puppet/confine/exists.rb
puppet-7.32.1 lib/puppet/confine/exists.rb
puppet-7.32.1-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.32.1-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.32.1-universal-darwin lib/puppet/confine/exists.rb
puppet-7.31.0 lib/puppet/confine/exists.rb
puppet-7.31.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.31.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.31.0-universal-darwin lib/puppet/confine/exists.rb
puppet-7.30.0 lib/puppet/confine/exists.rb
puppet-7.30.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.30.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.30.0-universal-darwin lib/puppet/confine/exists.rb