summaryrefslogtreecommitdiff
path: root/lib/chef/resource/lwrp_base.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-02-19 14:40:06 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-02-23 10:14:04 -0800
commit30520d738a3683b15a70d43dd9cf1aa3da61686d (patch)
treec4b12e272e54d52f35f4123be1067afb4b78f5fc /lib/chef/resource/lwrp_base.rb
parenta7f5c92960aedf8d5bfc71abbce430ab075e016a (diff)
downloadchef-30520d738a3683b15a70d43dd9cf1aa3da61686d.tar.gz
nillable deploy resource + nillable LWRP args
introduced nillable_set_or_return so that we can actually set a nil value on a resource from the DSL. this fixes the case where you want to do (and we document) setting symlink_before_migrate to nil on the deploy resource. to implement this better also moved up the attribute DSL method to the base Chef::Resource class. all LWRP resources are now nillable as well.
Diffstat (limited to 'lib/chef/resource/lwrp_base.rb')
-rw-r--r--lib/chef/resource/lwrp_base.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb
index ce72e98028..a777c511f0 100644
--- a/lib/chef/resource/lwrp_base.rb
+++ b/lib/chef/resource/lwrp_base.rb
@@ -70,14 +70,6 @@ class Chef
alias_method :resource_name=, :resource_name
end
- # Define an attribute on this resource, including optional validation
- # parameters.
- def self.attribute(attr_name, validation_opts={})
- define_method(attr_name) do |arg=nil|
- set_or_return(attr_name.to_sym, arg, validation_opts)
- end
- end
-
# Sets the default action
def self.default_action(action_name=NULL_ARG)
unless action_name.equal?(NULL_ARG)