summaryrefslogtreecommitdiff
path: root/lib/chef/resource/cron.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-03-05 10:19:27 -0800
committerTim Smith <tsmith@chef.io>2018-03-05 20:55:05 -0800
commitdc4b862b11365f7cb71a58c8f48aa9e1b1921b27 (patch)
tree465f0a74a0be62bd9b228d43e13f78abe61879f9 /lib/chef/resource/cron.rb
parent86a8e51cf16d87cbc57c2635324ab8a8a04a49d9 (diff)
downloadchef-dc4b862b11365f7cb71a58c8f48aa9e1b1921b27.tar.gz
Convert more set_or_returns to proper propertiesmore_properties
Just modernizing our resources so we can start to add descriptions to them for the documentation Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/cron.rb')
-rw-r--r--lib/chef/resource/cron.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/chef/resource/cron.rb b/lib/chef/resource/cron.rb
index f6c009058c..32c47b963f 100644
--- a/lib/chef/resource/cron.rb
+++ b/lib/chef/resource/cron.rb
@@ -18,6 +18,7 @@
#
require "chef/resource"
+require "chef/provider/cron" # do not remove. we actually need this below
class Chef
class Resource
@@ -135,14 +136,7 @@ class Chef
)
end
- def time(arg = nil)
- set_or_return(
- :time,
- arg,
- :equal_to => Chef::Provider::Cron::SPECIAL_TIME_VALUES
- )
- end
-
+ property :time, Symbol, equal_to: Chef::Provider::Cron::SPECIAL_TIME_VALUES
property :mailto, String
property :path, String
property :home, String