diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-05 10:19:27 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-03-05 20:55:05 -0800 |
commit | dc4b862b11365f7cb71a58c8f48aa9e1b1921b27 (patch) | |
tree | 465f0a74a0be62bd9b228d43e13f78abe61879f9 /lib/chef/resource/dsc_resource.rb | |
parent | 86a8e51cf16d87cbc57c2635324ab8a8a04a49d9 (diff) | |
download | chef-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/dsc_resource.rb')
-rw-r--r-- | lib/chef/resource/dsc_resource.rb | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/chef/resource/dsc_resource.rb b/lib/chef/resource/dsc_resource.rb index 95ee32c946..3f7fc17901 100644 --- a/lib/chef/resource/dsc_resource.rb +++ b/lib/chef/resource/dsc_resource.rb @@ -74,13 +74,7 @@ class Chef end end - def module_version(arg = nil) - set_or_return( - :module_version, - arg, - :kind_of => [ String ] - ) - end + property :module_version, String def property(property_name, value = nil) if not property_name.is_a?(Symbol) @@ -113,13 +107,7 @@ class Chef end end - def timeout(arg = nil) - set_or_return( - :timeout, - arg, - :kind_of => [ Integer ] - ) - end + property :timeout, Integer private |