aboutsummaryrefslogtreecommitdiff
path: root/files/functions/gsub.rb
diff options
context:
space:
mode:
Diffstat (limited to 'files/functions/gsub.rb')
-rw-r--r--files/functions/gsub.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/files/functions/gsub.rb b/files/functions/gsub.rb
new file mode 100644
index 0000000..743a700
--- /dev/null
+++ b/files/functions/gsub.rb
@@ -0,0 +1,7 @@
+# generic gsub call
+module Puppet::Parser::Functions
+ newfunction(:gsub, :type => :rvalue) do |args|
+ args[0].gsub(/#{args[1]}/, args[2])
+ end
+end
+