summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/split.rb
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-12-11 13:15:33 +0100
committerintrigeri <intrigeri@boum.org>2010-12-11 13:15:33 +0100
commit1f1e5599b7a527b9889b5d2c8a92df8b2916cde7 (patch)
tree04edffd598bc3df9655b2e4981d9a348be6f4812 /lib/puppet/parser/functions/split.rb
parent001bbc5ff82337e6ddc7b13fb337b43ed36d2dee (diff)
parenta81984c77ed1efb56e978d8b5050b6c3ec409d80 (diff)
Merge remote branch 'shared/master'
Conflicts: lib/puppet/parser/functions/split.rb
Diffstat (limited to 'lib/puppet/parser/functions/split.rb')
-rw-r--r--lib/puppet/parser/functions/split.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/puppet/parser/functions/split.rb b/lib/puppet/parser/functions/split.rb
deleted file mode 100644
index bffecc1..0000000
--- a/lib/puppet/parser/functions/split.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# This function has two modes of operation:
-#
-# split($string, $delimiter) : $string
-#
-# Split the first argument on every $delimiter. $delimiter is interpreted as
-# Ruby regular expression.
-#
-# split($string[], $delimiter) : $string[][]
-#
-# Returns an array of split results with the result of applying split to each
-# item from the first argument.
-#
-# For long-term portability it is recommended to refrain from using Ruby's
-# extended RE features.
-module Puppet::Parser::Functions
- newfunction(:split, :type => :rvalue) do |args|
- if args[0].is_a?(Array)
- args.collect do |a| a.split(/#{args[1]}/) end
- else
- args[0].split(/#{args[1]}/)
- end
- end
-end