syntax - Ruby 2.2.4 Language Reference API Reference

Ruby 2.2 Language

Ruby Syntax

The Ruby syntax is large and is split up into the following sections:

Literals

Numbers, Strings, Arrays, Hashes, etc.

Assignment

Assignment and variables

Control Expressions

if, unless, while, until, for, break, next, redo

Methods

Method and method argument syntax

Calling Methods

How to call a method (or send a message to a method)

Modules and Classes

Creating modules and classes including inheritance

Exceptions

Exception handling syntax

Precedence

Precedence of ruby operators

Refinements

Use and behavior of the experimental refinements feature

Miscellaneous

alias, undef, BEGIN, END