From 13ae7fbace9434091d5381208f7b25ff8cf3a5c3 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Sat, 2 Aug 2008 13:16:10 +0200 Subject: minor fixes to .ignore and docs --- plugins/puppet/parser/functions/gsub.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/puppet') diff --git a/plugins/puppet/parser/functions/gsub.rb b/plugins/puppet/parser/functions/gsub.rb index 371820f..e2410ff 100644 --- a/plugins/puppet/parser/functions/gsub.rb +++ b/plugins/puppet/parser/functions/gsub.rb @@ -1,5 +1,9 @@ -# generic gsub call module Puppet::Parser::Functions + # thin wrapper around the ruby gsub function + # gsub($string, $pattern, $replacement) will replace all occurrences of + # $pattern in $string with $replacement. $string can be either a singel + # value or an array. In the latter case, each element of the array will + # be processed in turn. newfunction(:gsub, :type => :rvalue) do |args| if args[0].is_a?(Array) args[0].collect do |val| -- cgit v1.2.3