Class: Chef::Provider::WhyrunSafeRubyBlock
- Inherits:
-
RubyBlock
- Object
- Chef::Provider
- RubyBlock
- Chef::Provider::WhyrunSafeRubyBlock
- Defined in:
- lib/chef/provider/whyrun_safe_ruby_block.rb
Constant Summary
Constants included from Mixin::ShellOut
Mixin::ShellOut::DEPRECATED_OPTIONS
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, node_map, #process_resource_requirements, provides, provides?, #requirements, #resource_collection, #resource_updated?, #run_action, #set_updated_status, supports?, #whyrun_mode?, #whyrun_supported?
Methods included from Mixin::DescendantsTracker
#descendants, descendants, direct_descendants, #direct_descendants, find_descendants_by_name, #find_descendants_by_name, #inherited, store_inherited
Methods included from Mixin::ShellOut
#run_command_compatible_options, #shell_out, #shell_out!, #shell_out_with_systems_locale, #shell_out_with_systems_locale!
Constructor Details
This class inherits a constructor from Chef::Provider
Instance Method Details
#action_run ⇒ Object
24 25 26 27 28 29 |
# File 'lib/chef/provider/whyrun_safe_ruby_block.rb', line 24 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 |