diff options
author | danielsdeleo <dan@opscode.com> | 2013-01-23 15:25:49 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-01-23 15:25:49 -0800 |
commit | 9c95cb722a44440830cfc4da1c57f4815dafe904 (patch) | |
tree | cba364d6a568a5d33baea3bbb6ee07d6f7f98ed4 /lib/chef/resource.rb | |
parent | 53fa8088240f19a1dfc589d9ba07098cbdd9bba2 (diff) | |
download | chef-9c95cb722a44440830cfc4da1c57f4815dafe904.tar.gz |
remove cruft code.
In all of github there is not a single cookbook using this.
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r-- | lib/chef/resource.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index f3dabc5b28..7ee61db04c 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -18,7 +18,6 @@ # require 'chef/mixin/params_validate' -require 'chef/mixin/check_helper' require 'chef/dsl/platform_introspection' require 'chef/dsl/registry_helper' require 'chef/mixin/convert_to_class_name' @@ -120,7 +119,6 @@ F FORBIDDEN_IVARS = [:@run_context, :@node, :@not_if, :@only_if, :@enclosing_provider] HIDDEN_IVARS = [:@allowed_actions, :@resource_name, :@source_line, :@run_context, :@name, :@node, :@not_if, :@only_if, :@elapsed_time, :@enclosing_provider] - include Chef::Mixin::CheckHelper include Chef::Mixin::ParamsValidate include Chef::DSL::PlatformIntrospection include Chef::DSL::RegistryHelper @@ -324,17 +322,19 @@ F end def name(name=nil) - set_if_args(@name, name) do + if !name.nil? raise ArgumentError, "name must be a string!" unless name.kind_of?(String) @name = name end + @name end def noop(tf=nil) - set_if_args(@noop, tf) do + if !tf.nil? raise ArgumentError, "noop must be true or false!" unless tf == true || tf == false @noop = tf end + @noop end def ignore_failure(arg=nil) |