Method: Chef::Resource.allowed_actions

Defined in:
lib/chef/resource.rb

.allowed_actions(*actions) ⇒ Array<Symbol>

The list of allowed actions for the resource.

Parameters:

  • actions (Array<Symbol>)

    The list of actions to add to allowed_actions.

Returns:

  • (Array<Symbol>)

    The list of actions, as symbols.



1002
1003
1004
1005
1006
1007
1008
1009
1010
# File 'lib/chef/resource.rb', line 1002

def self.allowed_actions(*actions)
  @allowed_actions ||=
    if superclass.respond_to?(:allowed_actions)
      superclass.allowed_actions.dup
    else
      [ :nothing ]
    end
  @allowed_actions |= actions.flatten
end