Control Structures
Conditional structures
Operator
Description
==
Equality Operator
.eql?
Equality Operator (OO Style)
!=
Inequality operator
<
Less than
>
Greater than
<=
Less than or equal to
>=
Greater than or equal to
Loops
Iterators & Enumerators
Enumerator: object whose purpose is to enumerate another enumerable object. This means that enumerators are enumerable too.
If you have a method that uses an enumerable object, you may not want to pass the enumerable collection object because it is mutable and the method may modify it.
So you can pass an enumerator created with to_enum and nothing will happen to the original enumerable collection
Altering structured control flow (break/next)
BEGIN/END
These are two reserved words in Ruby.
Last updated