Class: Chef::Provider::WhyrunSafeRubyBlock
- Inherits:
-
RubyBlock
- Object
- Chef::Provider
- RubyBlock
- Chef::Provider::WhyrunSafeRubyBlock
- Defined in:
- lib/chef/provider/whyrun_safe_ruby_block.rb
Instance Attribute Summary
Attributes inherited from Chef::Provider
#action, #cookbook_name, #current_resource, #new_resource, #recipe_name, #run_context
Instance Method Summary collapse
Methods inherited from RubyBlock
#load_current_resource, #whyrun_supported?
Methods inherited from Chef::Provider
#action_nothing, #cleanup_after_converge, #converge_by, #define_resource_requirements, #events, #initialize, #load_current_resource, #node, #process_resource_requirements, #requirements, #resource_collection, #resource_updated?, #run_action, #set_updated_status, #whyrun_mode?, #whyrun_supported?
Methods included from DSL::Recipe
#build_resource, #declare_resource, #describe_self_for_error, #evaluate_resource_definition, #has_resource_definition?, #have_resource_class_for?, #method_missing, #resource_class_for
Methods included from Mixin::ConvertToClassName
#convert_to_class_name, #convert_to_snake_case, #filename_to_qualified_string, #snake_case_basename
Constructor Details
This class inherits a constructor from Chef::Provider
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Chef::DSL::Recipe
Instance Method Details
#action_run ⇒ Object
22 23 24 25 26 27 |
# File 'lib/chef/provider/whyrun_safe_ruby_block.rb', line 22 def action_run @new_resource.block.call @new_resource.updated_by_last_action(true) @run_context.events.resource_update_applied(@new_resource, :create, "execute the whyrun_safe_ruby_block #{@new_resource.name}") Chef::Log.info("#{@new_resource} called") end |