Method: Chef::Resource.is_custom_resource!

Defined in:
lib/chef/resource.rb

.is_custom_resource!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This sets the resource to being a custom resource, and does so in a way that automatically inherits to all subclasses via defining a method on the class (class variables and class instance variables don’t have the correct semantics here, this is a poor man’s activesupport class_attribute)



1173
1174
1175
1176
1177
# File 'lib/chef/resource.rb', line 1173

def self.is_custom_resource!
  define_singleton_method :custom_resource? do
    true
  end
end