Mercurial > repos > other > Puppet
comparison modules/stdlib/lib/puppet/parser/functions/glob.rb @ 275:d9352a684e62
Mass update of modules to remove deprecation warnings
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 26 Jan 2020 11:36:07 +0000 |
parents | c42fb28cff86 |
children | adf6fe9bbc17 |
comparison
equal
deleted
inserted
replaced
274:b2571c28fc27 | 275:d9352a684e62 |
---|---|
1 # | 1 # |
2 # glob.rb | 2 # glob.rb |
3 # | 3 # |
4 module Puppet::Parser::Functions | 4 module Puppet::Parser::Functions |
5 newfunction(:glob, :type => :rvalue, :doc => <<-'DOC' | 5 newfunction(:glob, :type => :rvalue, :doc => <<-DOC |
6 Returns an Array of file entries of a directory or an Array of directories. | 6 @summary |
7 Uses same patterns as Dir#glob | 7 Uses same patterns as Dir#glob. |
8 | |
9 @return | |
10 Returns an Array of file entries of a directory or an Array of directories. | |
11 | |
12 @example Example Usage: | |
13 $confs = glob(['/etc/**/*.conf', '/opt/**/*.conf']) | |
8 DOC | 14 DOC |
9 ) do |arguments| | 15 ) do |arguments| |
10 | 16 |
11 unless arguments.size == 1 | 17 unless arguments.size == 1 |
12 raise(Puppet::ParseError, 'glob(): Wrong number of arguments given ' \ | 18 raise(Puppet::ParseError, 'glob(): Wrong number of arguments given ' \ |