Method precedence
Method precedence is controlled by the following two method separators: .
and ->
.
The rules are the following:
.
binds the method to the object which precedes the dot->
makes everything from its left-side an expression and applies the method on the result
The infix backslash (\
) removes any leading or trailing whitespace at that current position and it's useful for expanding method calls on multiple lines:
is equivalent with:
Last updated