Class: Chef::Resource::ChefClient
- Inherits:
-
LWRPBase
- Object
- LWRPBase
- Chef::Resource::ChefClient
- Defined in:
- lib/chef/resource/chef_client.rb
Instance Method Summary collapse
-
#after(&block) ⇒ Object
Proc that runs after the resource completes.
-
#before(&block) ⇒ Object
Proc that runs just before the resource executes.
-
#initialize(*args) ⇒ ChefClient
constructor
A new instance of ChefClient.
Constructor Details
#initialize(*args) ⇒ ChefClient
Returns a new instance of ChefClient.
10 11 12 13 |
# File 'lib/chef/resource/chef_client.rb', line 10 def initialize(*args) super chef_server run_context.cheffish.current_chef_server end |
Instance Method Details
#after(&block) ⇒ Object
Proc that runs after the resource completes. Called with (resource, json, private_key, public_key)
41 42 43 |
# File 'lib/chef/resource/chef_client.rb', line 41 def after(&block) block ? @after = block : @after end |
#before(&block) ⇒ Object
Proc that runs just before the resource executes. Called with (resource)
36 37 38 |
# File 'lib/chef/resource/chef_client.rb', line 36 def before(&block) block ? @before = block : @before end |