Sha256: 4cff827dfa0d0be1b4d9ae0619263dd5fcea514c9659403cee85ea3968c57053

Contents?: true

Size: 486 Bytes

Versions: 93

Compression:

Stored size: 486 Bytes

Contents

require 'puppet/provider/confine'

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

  def pass?(value)
    value && (for_binary? ? which(value) : FileTest.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

93 entries across 93 versions & 4 rubygems

Version Path
puppet-parse-0.1.4 lib/vendor/puppet/provider/confine/exists.rb
puppet-parse-0.1.3 lib/vendor/puppet/provider/confine/exists.rb
puppet-parse-0.1.2 lib/vendor/puppet/provider/confine/exists.rb
puppet-parse-0.1.1 lib/vendor/puppet/provider/confine/exists.rb
puppet-2.7.26 lib/puppet/provider/confine/exists.rb
puppet-2.7.25 lib/puppet/provider/confine/exists.rb
puppet-2.7.24 lib/puppet/provider/confine/exists.rb
puppet-3.3.2 lib/puppet/provider/confine/exists.rb
puppet-3.3.1 lib/puppet/provider/confine/exists.rb
puppet-3.3.1.rc3 lib/puppet/provider/confine/exists.rb
puppet-3.3.1.rc2 lib/puppet/provider/confine/exists.rb
puppet-3.3.1.rc1 lib/puppet/provider/confine/exists.rb
puppet-3.3.0 lib/puppet/provider/confine/exists.rb
puppet-3.3.0.rc3 lib/puppet/provider/confine/exists.rb
puppet-3.3.0.rc2 lib/puppet/provider/confine/exists.rb
puppet-3.2.4 lib/puppet/provider/confine/exists.rb
puppet-2.7.23 lib/puppet/provider/confine/exists.rb
puppet-3.2.3 lib/puppet/provider/confine/exists.rb
puppet-3.2.3.rc1 lib/puppet/provider/confine/exists.rb
puppet-3.2.2 lib/puppet/provider/confine/exists.rb