diff options
author | Tim Smith <tsmith@chef.io> | 2018-08-13 13:28:30 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-08-13 13:28:30 -0700 |
commit | f6b4fb5467f5213a53fc5908223091b61210d701 (patch) | |
tree | 11841b1d3ea6e98f817b928916fc3915c1bb7f29 | |
parent | 1ef7f2dbeb5e36857fd1bee784726de3d462ce96 (diff) | |
download | chef-f6b4fb5467f5213a53fc5908223091b61210d701.tar.gz |
Add yard comments
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/cron_d.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/chef/resource/cron_d.rb b/lib/chef/resource/cron_d.rb index 5c11fb95c4..96ed83a19e 100644 --- a/lib/chef/resource/cron_d.rb +++ b/lib/chef/resource/cron_d.rb @@ -27,6 +27,12 @@ class Chef introduced "14.4" description "Use the cron_d resource to manage cron definitions in /etc/cron.d. This is similar to the 'cron' resource, but it does not use the monolithic /etc/crontab file." + # validate a provided value is between two other provided values + # we also allow * as a valid input + # @param spec the value to validate + # @param min the lowest value allowed + # @param max the highest value allowed + # @return [Boolean] valid or not? def self.validate_numeric(spec, min, max) return true if spec == "*" # binding.pry @@ -45,6 +51,9 @@ class Chef true end + # validate the provided month value to be jan - dec, 1 - 12, or * + # @param spec the value to validate + # @return [Boolean] valid or not? def self.validate_month(spec) return true if spec == "*" if spec.respond_to? :to_int @@ -60,6 +69,9 @@ class Chef end end + # validate the provided day of the week is sun-sat, 0-7, or * + # @param spec the value to validate + # @return [Boolean] valid or not? def self.validate_dow(spec) return true if spec == "*" if spec.respond_to? :to_int |