Class: Chef::Resource::ChefClient

Inherits:
LWRPBase
  • Object
show all
Defined in:
lib/chef/resource/chef_client.rb

Instance Method Summary collapse

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