Class: Puppet::Provider::Confine::True

Inherits:
Puppet::Provider::Confine show all
Defined in:
lib/vendor/puppet/provider/confine/true.rb

Constant Summary

Constants included from Util

Util::AbsolutePathPosix, Util::AbsolutePathWindows

Instance Attribute Summary

Attributes inherited from Puppet::Provider::Confine

#for_binary, #label, #values

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Puppet::Provider::Confine

#for_binary?, inherited, #initialize, #reset, #result, test, #valid?

Methods included from Util

absolute_path?, activerecord_version, benchmark, binread, chuser, classproxy, #execfail, #execpipe, execute, execute_posix, execute_windows, logmethods, memory, path_to_uri, proxy, replace_file, safe_posix_fork, symbolize, symbolizehash, symbolizehash!, synchronize_on, thinmark, #threadlock, uri_to_path, wait_for_output, which, withumask

Methods included from Util::POSIX

#get_posix_field, #gid, #idfield, #methodbyid, #methodbyname, #search_posix_field, #uid

Constructor Details

This class inherits a constructor from Puppet::Provider::Confine

Class Method Details

.summarize(confines) ⇒ Object



4
5
6
# File 'lib/vendor/puppet/provider/confine/true.rb', line 4

def self.summarize(confines)
  confines.inject(0) { |count, confine| count + confine.summary }
end

Instance Method Details

#message(value) ⇒ Object



13
14
15
# File 'lib/vendor/puppet/provider/confine/true.rb', line 13

def message(value)
  "false value when expecting true"
end

#pass?(value) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
# File 'lib/vendor/puppet/provider/confine/true.rb', line 8

def pass?(value)
  # Double negate, so we only get true or false.
  ! ! value
end

#summaryObject



17
18
19
# File 'lib/vendor/puppet/provider/confine/true.rb', line 17

def summary
  result.find_all { |v| v == true }.length
end