diff options
author | David Schmitt <david@dasz.at> | 2009-06-09 17:51:10 +0200 |
---|---|---|
committer | David Schmitt <david@dasz.at> | 2009-06-09 17:51:10 +0200 |
commit | de7690c4e76ddd7c1f01d81fe92c75771da47c51 (patch) | |
tree | 1cba3866aa6db7beb2ba59bddefb508b5d0ddbb7 /plugins/puppet/parser/functions/gsub.rb | |
parent | c65920d6b8d017c951838c72f4bbcb75d5b27234 (diff) | |
download | puppet-common-de7690c4e76ddd7c1f01d81fe92c75771da47c51.tar.gz puppet-common-de7690c4e76ddd7c1f01d81fe92c75771da47c51.tar.bz2 |
RDoc-ify documentation
See http://club.black.co.at/david/puppet/doc/ for a current version of the RDoc
output.
Diffstat (limited to 'plugins/puppet/parser/functions/gsub.rb')
-rw-r--r-- | plugins/puppet/parser/functions/gsub.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/puppet/parser/functions/gsub.rb b/plugins/puppet/parser/functions/gsub.rb index e2410ff..27e6192 100644 --- a/plugins/puppet/parser/functions/gsub.rb +++ b/plugins/puppet/parser/functions/gsub.rb @@ -1,9 +1,13 @@ +# +# A 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 single value or an array. In the latter case, each +# element of the array will be processed in turn. +# 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| |