Method: Puppet::Parameter::ValueCollection#munge

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

#munge(value) ⇒ Object

If the specified value is allowed, then munge appropriately.



64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/vendor/puppet/parameter/value_collection.rb', line 64

def munge(value)
  return value if empty?

  if instance = match?(value)
    if instance.regex?
      return value
    else
      return instance.name
    end
  else
    return value
  end
end