Class: Chef::Resource::ChefUser

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ChefUser

Grab environment from with_environment



13
14
15
16
# File 'lib/chef/resource/chef_user.rb', line 13

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)



51
52
53
# File 'lib/chef/resource/chef_user.rb', line 51

def after(&block)
  block ? @after = block : @after
end

#before(&block) ⇒ Object

Proc that runs just before the resource executes. Called with (resource)



46
47
48
# File 'lib/chef/resource/chef_user.rb', line 46

def before(&block)
  block ? @before = block : @before
end