chef

https://github.com/opscode/chef

Ruby

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

Chef::Property#get

Get the property value from the resource, handling lazy values,
defaults, and validation.

- If the property's value is lazy, it is evaluated, coerced and validated.
- If the property has no value, and is required, raises ValidationFailed.
- If the property has no value, but has a lazy default, it is evaluated,
  coerced and validated. If the evaluated value is frozen, the resulting
- If the property has no value, but has a default, the default value
  will be returned and frozen. If the default value is lazy, it will be
  evaluated, coerced and validated, and the result stored in the property.
- If the property has no value, but is name_property, `resource.name`
  is retrieved, coerced, validated and stored in the property.
- Otherwise, `nil` is returned.

Source | Google | Stack overflow

Edit

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

cd chef

open lib/chef/property.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--Property-get-for-pr


# Commit to git

git add lib/chef/property.rbgit commit -m "better docs for Chef::Property#get"


# 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--Property-get-for-pr

hub pull-request


# Celebrate!