Method: Puppet::Parameter::ValueCollection#match?

Defined in:
lib/vendor/puppet/parameter/value_collection.rb

#match?(test_value) ⇒ Boolean

Can we match a given value?

Returns:

  • (Boolean)


53
54
55
56
57
58
59
60
61
# File 'lib/vendor/puppet/parameter/value_collection.rb', line 53

def match?(test_value)
  # First look for normal values
  if value = @strings.find { |v| v.match?(test_value) }
    return value
  end

  # Then look for a regex match
  @regexes.find { |v| v.match?(test_value) }
end