summaryrefslogtreecommitdiff
path: root/lib/chef/resource/ruby_block.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/ruby_block.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/ruby_block.rb')
-rw-r--r--lib/chef/resource/ruby_block.rb15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/chef/resource/ruby_block.rb b/lib/chef/resource/ruby_block.rb
index 89b90ae70b..a3cb9e56e5 100644
--- a/lib/chef/resource/ruby_block.rb
+++ b/lib/chef/resource/ruby_block.rb
@@ -29,13 +29,6 @@ class Chef
default_action :run
allowed_actions :create, :run
- identity_attr :block_name
-
- def initialize(name, run_context = nil)
- super
- @block_name = name
- end
-
def block(&block)
if block_given? && block
@block = block
@@ -44,13 +37,7 @@ class Chef
end
end
- def block_name(arg = nil)
- set_or_return(
- :block_name,
- arg,
- :kind_of => String
- )
- end
+ property :block_name, String, name_property: true, identity: true
end
end
end