summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/grep.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/functions/grep.rb')
-rw-r--r--lib/puppet/parser/functions/grep.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/grep.rb b/lib/puppet/parser/functions/grep.rb
index 2caaa6f..ceba9ec 100644
--- a/lib/puppet/parser/functions/grep.rb
+++ b/lib/puppet/parser/functions/grep.rb
@@ -4,6 +4,16 @@
module Puppet::Parser::Functions
newfunction(:grep, :type => :rvalue, :doc => <<-EOS
+This function searches through an array and returns any elements that match
+the provided regular expression.
+
+*Examples:*
+
+ grep(['aaa','bbb','ccc','aaaddd'], 'aaa')
+
+Would return:
+
+ ['aaa','aaaddd']
EOS
) do |arguments|