diff options
author | Ken Barber <ken@bob.sh> | 2011-07-29 23:09:30 +0100 |
---|---|---|
committer | Ken Barber <ken@bob.sh> | 2011-07-29 23:09:30 +0100 |
commit | a1cae426f1d6b8f2c19184ec8aac3ebc47d97744 (patch) | |
tree | 2d40ab0b183ae285560569e625ee41df79e39784 /lib/puppet/parser/functions/flatten.rb | |
parent | 19313b43ea04066a88a0b78e83650ac52785e2e9 (diff) | |
download | puppet-stdlib-a1cae426f1d6b8f2c19184ec8aac3ebc47d97744.tar.gz puppet-stdlib-a1cae426f1d6b8f2c19184ec8aac3ebc47d97744.tar.bz2 |
(#3) Provide documentation for remaining functions.
Diffstat (limited to 'lib/puppet/parser/functions/flatten.rb')
-rw-r--r-- | lib/puppet/parser/functions/flatten.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/flatten.rb b/lib/puppet/parser/functions/flatten.rb index 6036f72..781da78 100644 --- a/lib/puppet/parser/functions/flatten.rb +++ b/lib/puppet/parser/functions/flatten.rb @@ -4,6 +4,14 @@ module Puppet::Parser::Functions newfunction(:flatten, :type => :rvalue, :doc => <<-EOS +This function flattens any deeply nested arrays and returns a single flat array +as a result. + +*Examples:* + + flatten(['a', ['b', ['c']]]) + +Would return: ['a','b','c'] EOS ) do |arguments| |