chef

https://github.com/opscode/chef

Ruby

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

Chef::Resource.action

Define an action on this resource.

The action is defined as a *recipe* block that will be compiled and then
converged when the action is taken (when Resource is converged).  The recipe
has access to the resource's attributes and methods, as well as the Chef
recipe DSL.

Resources in the action recipe may notify and subscribe to other resources
within the action recipe, but cannot notify or subscribe to resources
in the main Chef run.

Resource actions are *inheritable*: if resource A defines `action :create`
and B is a subclass of A, B gets all of A's actions.  Additionally,
resource B can define `action :create` and call `super()` to invoke A's
action code.

The first action defined (besides `:nothing`) will become the default
action for the resource.

Source | Google | Stack overflow

Edit

git clone [email protected]:opscode/chef.git

cd chef

open lib/chef/resource.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--Resource-action-for-pr


# Commit to git

git add lib/chef/resource.rbgit commit -m "better docs for Chef::Resource.action"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Chef--Resource-action-for-pr

hub pull-request


# Celebrate!