Hi,
Is they are something like the ruby ternary operator ?: in puppet ?
I would like to do something like
$value = $hash.has_key('key') ? $hash('key') : $default_value
instead of
if $hash.has_key('key') {
$value = $hash('key')
}
else
{
$value = $default_value
}
to not get a lot of if.
Regards
--
Albert SHIH
DIO bātiment 15
Heure local/Local time:
Wed Jan 16 12:06:15 CET 2019
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/20190116110922.GD1721%40io.chezmoi.fr.
For more options, visit https://groups.google.com/d/optout.