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.15.0 lib/puppet/confine/exists.rb
puppet-7.15.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.15.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.15.0-universal-darwin lib/puppet/confine/exists.rb
puppet-7.14.0 lib/puppet/confine/exists.rb
puppet-7.14.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.14.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.14.0-universal-darwin lib/puppet/confine/exists.rb
puppet-7.13.1 lib/puppet/confine/exists.rb
puppet-7.13.1-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.13.1-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.13.1-universal-darwin lib/puppet/confine/exists.rb
puppet-7.12.1 lib/puppet/confine/exists.rb
puppet-7.12.1-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.12.1-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.12.1-universal-darwin lib/puppet/confine/exists.rb
puppet-7.12.0 lib/puppet/confine/exists.rb
puppet-7.12.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-7.12.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-7.12.0-universal-darwin lib/puppet/confine/exists.rb