diff options
author | intrigeri <intrigeri@boum.org> | 2010-12-11 13:15:33 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2010-12-11 13:15:33 +0100 |
commit | 1f1e5599b7a527b9889b5d2c8a92df8b2916cde7 (patch) | |
tree | 04edffd598bc3df9655b2e4981d9a348be6f4812 /lib/puppet/parser/functions/join.rb | |
parent | 001bbc5ff82337e6ddc7b13fb337b43ed36d2dee (diff) | |
parent | a81984c77ed1efb56e978d8b5050b6c3ec409d80 (diff) | |
download | puppet-common-1f1e5599b7a527b9889b5d2c8a92df8b2916cde7.tar.gz puppet-common-1f1e5599b7a527b9889b5d2c8a92df8b2916cde7.tar.bz2 |
Merge remote branch 'shared/master'
Conflicts:
lib/puppet/parser/functions/split.rb
Diffstat (limited to 'lib/puppet/parser/functions/join.rb')
-rw-r--r-- | lib/puppet/parser/functions/join.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/join.rb b/lib/puppet/parser/functions/join.rb new file mode 100644 index 0000000..95b664c --- /dev/null +++ b/lib/puppet/parser/functions/join.rb @@ -0,0 +1,10 @@ +Puppet::Parser::Functions::newfunction( + :join, + :type => :rvalue, + :doc => "Joins the values of the array in arg1 with the string in arg2 + + Example: join(['a','b'],',') -> 'a,b'" +) do |args| + raise Puppet::ParseError, 'join() needs two arguments' if args.length != 2 + args[0].to_a.join(args[1]) +end |