Method: Puppet::Property.array_matching
- Defined in:
- lib/puppet/property.rb
.array_matching ⇒ Symbol
Note:
The semantics of these modes are implemented by the method #insync?. That method is the default implementation and it has a backwards compatible behavior that imposes additional constraints on what constitutes a positive match. A derived property may override that method.
The ‘is` vs. `should` array matching mode; `:first`, or `:all`.
-
‘:first` This is primarily used for single value properties. When matched against an array of values a match is true if the `is` value matches any of the values in the `should` array. When the `is` value is also an array, the matching is performed against the entire array as the `is` value.
-
‘:all` : This is primarily used for multi-valued properties. When matched against an array of
`should` values, the size of `is` and `should` must be the same, and all values in `is` must match a value in `should`.
92 93 94 |
# File 'lib/puppet/property.rb', line 92 def array_matching @array_matching ||= :first end |