Module: Chef::DSL::Resources Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Module containing a method for each globally declared Resource
Depends on declare_resource(name, created_at, &block)
Class Method Summary collapse
Methods included from ChefProvisioning
Methods included from Cheffish
Class Method Details
.add_resource_dsl(dsl_name) ⇒ 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.
35 36 37 38 39 40 41 |
# File 'lib/chef/dsl/resources.rb', line 35 def self.add_resource_dsl(dsl_name) module_eval(" def \#{dsl_name}(args = nil, &block)\n declare_resource(\#{dsl_name.inspect}, args, created_at: caller[0], &block)\n end\n EOM\nend\n", __FILE__, __LINE__ + 1) |
.remove_resource_dsl(dsl_name) ⇒ 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.
43 44 45 46 |
# File 'lib/chef/dsl/resources.rb', line 43 def self.remove_resource_dsl(dsl_name) remove_method(dsl_name) rescue NameError end |