Class: Chef::RunContext::ChildRunContext Private
- Inherits:
-
Chef::RunContext
- Object
- Chef::RunContext
- Chef::RunContext::ChildRunContext
- Extended by:
- Forwardable
- Defined in:
- lib/chef/run_context.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A child run context. Delegates all root context calls to its parent.
Constant Summary collapse
- CHILD_STATE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%w{ audits audits= create_child add_delayed_action delayed_actions delayed_notification_collection delayed_notification_collection= delayed_notifications immediate_notification_collection immediate_notification_collection= immediate_notifications before_notification_collection before_notifications include_recipe initialize_child_state load_recipe load_recipe_file notifies_before notifies_immediately notifies_delayed parent_run_context resource_collection resource_collection= }.map { |x| x.to_sym }
Instance Attribute Summary
Attributes inherited from Chef::RunContext
#audits, #before_notification_collection, #cookbook_collection, #definitions, #delayed_actions, #delayed_notification_collection, #events, #immediate_notification_collection, #node, #parent_run_context, #reboot_info, #resource_collection
Instance Method Summary collapse
-
#initialize(parent_run_context) ⇒ ChildRunContext
constructor
private
A new instance of ChildRunContext.
Methods inherited from Chef::RunContext
#add_delayed_action, #before_notifications, #cancel_reboot, #create_child, #delayed_notifications, #has_cookbook_file_in_cookbook?, #has_template_in_cookbook?, #immediate_notifications, #include_recipe, #initialize_child_state, #load, #load_recipe, #load_recipe_file, #loaded_attribute, #loaded_attributes, #loaded_fully_qualified_attribute?, #loaded_fully_qualified_recipe?, #loaded_recipe, #loaded_recipe?, #loaded_recipes, #notifies_before, #notifies_delayed, #notifies_immediately, #open_stream, #reboot_requested?, #request_reboot, #resolve_attribute, #unreachable_cookbook?
Methods included from Deprecated
#audits=, #delayed_notification_collection=, #immediate_notification_collection=
Constructor Details
#initialize(parent_run_context) ⇒ ChildRunContext
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.
Returns a new instance of ChildRunContext.
625 626 627 628 629 630 631 632 |
# File 'lib/chef/run_context.rb', line 625 def initialize(parent_run_context) @parent_run_context = parent_run_context # We don't call super, because we don't bother initializing stuff we're # going to delegate to the parent anyway. Just initialize things that # every instance needs. initialize_child_state end |