diff options
Diffstat (limited to 'plugins/puppet/parser/functions/prefix_with.rb')
-rw-r--r-- | plugins/puppet/parser/functions/prefix_with.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/puppet/parser/functions/prefix_with.rb b/plugins/puppet/parser/functions/prefix_with.rb index 6e64a4a..5a12986 100644 --- a/plugins/puppet/parser/functions/prefix_with.rb +++ b/plugins/puppet/parser/functions/prefix_with.rb @@ -1,5 +1,15 @@ -# prefix arguments 2..n with first argument - +# Prefixes arguments 2..n with first argument. +# +# prefix_with(string prefix, string[] arguments) : string[] +# +# Example: +# +# prefix_with("php-", [ "blah", "foo" ]) +# +# will result in this array: +# +# [ "php-blah", "php-foo" ] +# module Puppet::Parser::Functions newfunction(:prefix_with, :type => :rvalue) do |args| prefix = args.shift |