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#name
The name of this particular resource.
This special resource attribute is set automatically from the declaration
of the resource, e.g.
execute 'Vitruvius' do
command 'ls'
end
Will set the name to "Vitruvius".
This is also used in to_s to show the resource name, e.g. `execute[Vitruvius]`.
This is also used for resource notifications and subscribes in the same manner.
This will coerce any object into a string via #to_s. Arrays are a special case
so that `package ["foo", "bar"]` becomes package[foo, bar] instead of the more
awkward `package[["foo", "bar"]]` that #to_s would produce.Edit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/resource.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--Resource-name-for-pr
# Commit to gitgit add lib/chef/resource.rbgit commit -m "better docs for Chef::Resource#name"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--Resource-name-for-pr
hub pull-request
# Celebrate!