X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fshell_split.rb;h=7c9f12375d67d3d4636ea7cef6adf7be1e80b76d;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=09e6e78ce12ed3a405b365cf769e8519c29614e1;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/shell_split.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/shell_split.rb index 09e6e78ce..7c9f12375 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/shell_split.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/shell_split.rb @@ -1,16 +1,18 @@ +require 'shellwords' # # shell_split.rb # - -require 'shellwords' - module Puppet::Parser::Functions - newfunction(:shell_split, :type => :rvalue, :doc => <<-EOS -Splits a string into an array of tokens in the same way the Bourne shell does. + newfunction(:shell_split, :type => :rvalue, :doc => <<-DOC + @summary + Splits a string into an array of tokens in the same way the Bourne shell does. + + @return + array of tokens -This function behaves the same as ruby's Shellwords.shellsplit() function - EOS - ) do |arguments| + This function behaves the same as ruby's Shellwords.shellsplit() function + DOC + ) do |arguments| raise(Puppet::ParseError, "shell_split(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1