Method: Chef::Resource::LWRPBase.actions

Defined in:
lib/chef/resource/lwrp_base.rb

.actions(*action_names) ⇒ Object

Adds action_names to the list of valid actions for this resource. Does not include superclass’s action list when appending.



78
79
80
81
82
83
84
85
# File 'lib/chef/resource/lwrp_base.rb', line 78

def actions(*action_names)
  action_names = action_names.flatten
  if !action_names.empty? && !@allowed_actions
    self.allowed_actions = ([ :nothing ] + action_names).uniq
  else
    allowed_actions(*action_names)
  end
end