diff options
author | Martin Hellmich <mhellmic@gmail.com> | 2013-04-22 23:24:38 +0200 |
---|---|---|
committer | Martin Hellmich <mhellmic@gmail.com> | 2013-04-22 23:24:38 +0200 |
commit | 89bceb2821d82c64434e6529de48ec7d7389a13e (patch) | |
tree | 28378bbd407cae78abbff2a1fc86349db9d58c0b /lib/puppet/parser/functions/prefix.rb | |
parent | 0c622b2e30333f26103a4440a888d440cf455c9c (diff) | |
parent | bebecd33783b483f6af059e311b9631d3a3336cc (diff) | |
download | puppet-stdlib-89bceb2821d82c64434e6529de48ec7d7389a13e.tar.gz puppet-stdlib-89bceb2821d82c64434e6529de48ec7d7389a13e.tar.bz2 |
Merge branch 'master' of git://github.com/puppetlabs/puppetlabs-stdlib
Diffstat (limited to 'lib/puppet/parser/functions/prefix.rb')
-rw-r--r-- | lib/puppet/parser/functions/prefix.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/parser/functions/prefix.rb b/lib/puppet/parser/functions/prefix.rb index 4593976..62211ae 100644 --- a/lib/puppet/parser/functions/prefix.rb +++ b/lib/puppet/parser/functions/prefix.rb @@ -6,7 +6,7 @@ module Puppet::Parser::Functions newfunction(:prefix, :type => :rvalue, :doc => <<-EOS This function applies a prefix to all elements in an array. -*Examles:* +*Examples:* prefix(['a','b','c'], 'p') @@ -21,14 +21,14 @@ Will return: ['pa','pb','pc'] array = arguments[0] unless array.is_a?(Array) - raise(Puppet::ParseError, 'prefix(): Requires array to work with') + raise Puppet::ParseError, "prefix(): expected first argument to be an Array, got #{array.inspect}" end prefix = arguments[1] if arguments[1] if prefix unless prefix.is_a?(String) - raise(Puppet::ParseError, 'prefix(): Requires string to work with') + raise Puppet::ParseError, "prefix(): expected second argument to be a String, got #{suffix.inspect}" end end |