chef

https://github.com/opscode/chef

Ruby

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

Chef::Formatters::IndentableOutputStream#print

Print a string.

== Arguments
string: string to print.
options: a hash with these possible options:
- :stream => OBJ: unique identifier for a stream. If two prints have
          different streams, they will print on separate lines.
          Otherwise, they will stay together.
- :start_line => BOOLEAN: if true, print will begin on a blank (indented) line.
- :end_line => BOOLEAN: if true, current line will be ended.
- :name => STRING: a name to prefix in front of a stream. It will be printed
          once (with the first line of the stream) and subsequent lines
          will be indented to match.

== Alternative

You may also call print('string', :red) (a list of colors a la Highline.color)

Source | Google | Stack overflow

Edit

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

cd chef

open lib/chef/formatters/indentable_output_stream.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--Formatters--IndentableOutputStream-print-for-pr


# Commit to git

git add lib/chef/formatters/indentable_output_stream.rbgit commit -m "better docs for Chef::Formatters::IndentableOutputStream#print"


# 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--Formatters--IndentableOutputStream-print-for-pr

hub pull-request


# Celebrate!