Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Chef
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mastering Chef

Mastering Chef

By : Mayank Joshi
2.5 (4)
close
close
Mastering Chef

Mastering Chef

2.5 (4)
By: Mayank Joshi

Overview of this book

If you have used Chef before and are interested in automation of infrastructure and want to develop your own tools to manage large-scale infrastructures, then this book is for you.
Table of Contents (15 chapters)
close
close
2
2. Knife and Its Associated Plugins
10
10. Data Bags and Templates
14
Index

Basic operations


Like all other programming languages, Ruby comes packed with a whole bunch of operators.

Arithmetic operators

Assume a = 2 and b = 4.

Operator

Description

Example

+

Addition: Adds values on either side of the operator

a + b will give 6

-

Subtraction: Subtracts the right-hand side operand from the left-hand side operand

a – b will give -2

*

Multiplication: Multiplies values on either side of the operator

a * b will give 8

/

Division: Divides the left-hand side operand by the right-hand side operand

b / a will give 2

%

Modulus: Divides the left-hand side operand by the right-hand side operand and returns the remainder

b % a will give 0

**

Exponent: Performs exponential (power) calculations on operators

a ** b will give 2 to the power of 4, which is 16

Comparison operators

Operator

Description

Example

==

Checks whether the values of the two operands are equal or not; if yes, then the condition becomes true.

(a == b) is not true.

!=

Checks whether the...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Chef
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon