diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2021-09-23 15:17:17 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2021-09-23 15:17:17 -0700 |
commit | 0c328e8464d12398597f1b8a053e37d602efa894 (patch) | |
tree | b9444a52ee2b28ddf0882f495e4568271a0382b5 | |
parent | 50709721e8e8c9e3a9912c69e9a1666595878453 (diff) | |
download | chef-0c328e8464d12398597f1b8a053e37d602efa894.tar.gz |
Doc comments for arbitrary hashes
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/compliance/input_collection.rb | 4 | ||||
-rw-r--r-- | lib/chef/compliance/waiver_collection.rb | 8 |
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? |