puppetlabs-stdlib/lib/puppet/parser/functions
Gary Larizza ba6dd13990 Add the pick() function
This function is similar to a coalesce function in SQL in that it will
return
the first value in a list of values that is not undefined or an empty
string
(two things in Puppet that will return a boolean false value).
Typically,
this function is used to check for a value in the Puppet
Dashboard/Enterprise
Console, and failover to a default value like the following:

  $real_jenkins_version = pick($::jenkins_version, '1.449')

The value of $real_jenkins_version will first look for a top-scope
variable
called 'jenkins_version' (note that parameters set in the Puppet
Dashboard/
Enterprise Console are brought into Puppet as top-scope variables), and,
failing that, will use a default value of 1.449.
2012-11-15 08:52:19 -05:00
..
abs.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
bool2num.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
capitalize.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
chomp.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
chop.rb Added doc strings for first five functions 2011-07-30 04:22:30 +10:00
defined_with_params.rb Handle undef for parameter argument 2012-10-25 10:54:33 -07:00
delete.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
delete_at.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
downcase.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
empty.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
ensure_resource.rb Explicitly load functions used by ensure_resource 2012-10-25 10:57:40 -07:00
flatten.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
fqdn_rotate.rb (#13205) Rotate array/string randomley based on fqdn, fqdn_rotate() 2012-03-18 12:19:48 +01:00
get_module_path.rb (Maint) Fix up the get_module_path parser function 2012-07-23 09:21:22 -07:00
getvar.rb Docs: Copyedit function doc strings 2011-08-18 12:39:04 -07:00
grep.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
has_interface_with.rb (#13974) Add predicate functions for interface facts 2012-11-07 14:00:44 -08:00
has_ip_address.rb (#13974) Add predicate functions for interface facts 2012-11-07 14:00:44 -08:00
has_ip_network.rb (#13974) Add predicate functions for interface facts 2012-11-07 14:00:44 -08:00
has_key.rb Docs: Correct indentation of markdown code examples 2011-08-18 12:39:04 -07:00
hash.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_array.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_domain_name.rb Check according to rfc1035 2012-01-11 19:17:03 -08:00
is_float.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_hash.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_integer.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_ip_address.rb Prep for stdlib merge 2011-08-05 08:25:03 +01:00
is_mac_address.rb Prep for stdlib merge 2011-08-05 08:25:03 +01:00
is_numeric.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
is_string.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
join.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
keys.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
loadyaml.rb Docs: Copyedit function doc strings 2011-08-18 12:39:04 -07:00
lstrip.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
member.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
merge.rb Docs: Improve example in merge function 2011-08-18 12:39:04 -07:00
num2bool.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
parsejson.rb (#10285) Refactor json to use pson instead. 2011-10-25 15:54:47 -07:00
parseyaml.rb Prep for stdlib merge 2011-08-05 08:25:03 +01:00
pick.rb Add the pick() function 2012-11-15 08:52:19 -05:00
prefix.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
range.rb (#13494) Specify the behavior of zero padded strings 2012-03-29 15:17:30 -07:00
reverse.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
rstrip.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
shuffle.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
size.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
sort.rb Fix some ruby 1.9.2 issues. 2011-07-30 00:44:02 +01:00
squeeze.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
str2bool.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
str2saltedsha512.rb New str2saltedsha512 function for OS X Passwords 2012-01-09 11:30:47 -08:00
strftime.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
strip.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
swapcase.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
time.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
to_bytes.rb (#15872) Add to_bytes function 2012-08-14 08:43:36 -07:00
type.rb (#3) Provide documentation for remaining functions. 2011-07-29 23:09:30 +01:00
unique.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
upcase.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
uriescape.rb Add function, uriescape, to URI.escape strings. Redmine #17459 2012-11-07 09:36:54 -08:00
validate_absolute_path.rb (#12357) Fix broken compatibility with Puppet 2.6 2012-03-12 15:59:50 -07:00
validate_array.rb Docs: Copyedit function doc strings 2011-08-18 12:39:04 -07:00
validate_bool.rb Docs: Remove author emails from stdlib functions 2011-08-18 12:39:05 -07:00
validate_hash.rb Docs: Remove author emails from stdlib functions 2011-08-18 12:39:05 -07:00
validate_re.rb (maint) Comment Ken's fix to String#any? 2012-03-09 14:08:54 -08:00
validate_slength.rb (#12776) Added validate_slength function and rspec test 2012-02-22 18:12:34 +00:00
validate_string.rb Docs: Copyedit function doc strings 2011-08-18 12:39:04 -07:00
values.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00
values_at.rb Fix some ruby 1.9.2 issues. 2011-07-30 00:44:02 +01:00
zip.rb (#3) Apply missing documentation to more functions. 2011-07-29 22:18:56 +01:00