summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-09-23 15:17:17 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-09-23 15:17:17 -0700
commit0c328e8464d12398597f1b8a053e37d602efa894 (patch)
treeb9444a52ee2b28ddf0882f495e4568271a0382b5
parent50709721e8e8c9e3a9912c69e9a1666595878453 (diff)
downloadchef-0c328e8464d12398597f1b8a053e37d602efa894.tar.gz
Doc comments for arbitrary hashes
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/compliance/input_collection.rb4
-rw-r--r--lib/chef/compliance/waiver_collection.rb8
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/chef/compliance/input_collection.rb b/lib/chef/compliance/input_collection.rb
index 6c08466990..a8a9d6328f 100644
--- a/lib/chef/compliance/input_collection.rb
+++ b/lib/chef/compliance/input_collection.rb
@@ -84,6 +84,10 @@ class Chef
#
# include_input ".*::ssh.*"
#
+ # @example Adding an arbitrary hash of data (not from any file in a cookbook)
+ #
+ # include_input({ "ssh_custom_path": "/usr/local/bin" })
+ #
def include_input(arg)
raise "include_input was given a nil value" if arg.nil?
diff --git a/lib/chef/compliance/waiver_collection.rb b/lib/chef/compliance/waiver_collection.rb
index b8feb2da87..4fe659554b 100644
--- a/lib/chef/compliance/waiver_collection.rb
+++ b/lib/chef/compliance/waiver_collection.rb
@@ -84,6 +84,14 @@ class Chef
#
# include_waiver ".*::ssh.*"
#
+ # @example Adding an arbitrary hash of data (not from any file in a cookbook)
+ #
+ # include_waiver({ "ssh-01" => {
+ # "expiration_date" => "2033-07-31",
+ # "run" => false,
+ # "justification" => "the reason it is waived",
+ # } })
+ #
def include_waiver(arg)
raise "include_waiver was given a nil value" if arg.nil?