Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 9d008c7312
Fetching contributors…

Cannot retrieve contributors at this time

103 lines (101 sloc) 4.964 kB
<link rel=next href=/references>
<article>
<h1 id=keywords>Appendix: Keywords</h1>
<dl>
<dt><a href=/methods#aliases><code>alias</code></a>
<dd>Creates a copy of an existing method with a new name.
<dt><a href=/flow#and-operator><code>and</code></a>
<dd>Boolean binary operator performing logical AND.
<dt><a href=/flow#begin-statement><code>begin</code></a>
<dd>Introduces a block of code which may have <code>rescue</code>,
<code>ensure</code>, and <code>else</code> clauses attached.
<dt><a href=/flow#break-statement><code>break</code></a>
<dd>Within a loop or block, transfers control to the statement
immediately following the construct.
<dt><a href=/classes#class-keyword><code>class</code></a>
<dd>Defines a class.
<dt><a href=/flow#case-statement><code>case</code></a>
<dd>Multi-way conditional predicated on the value of a given expression.
<dt><a href=/methods#defining><code>def</code></a>
<dd>Defines a method
<dt><a href=#defined><code>defined?</code></a>
<dd>
<dt><a href=/messages#block-argument><code>do</code></a> <!-- ?? -->
<dd>Delimits a block literal
<dt><a href=/flow#if-else-clause><code>else</code></a> <!-- rescue else
clause -->
<dd>Optional default clause for the <code>case</code>, <code>if</code>,
<code>unless</code> statements. Optional clause of <code>begin</code>,
<code>class</code>, <code>def</code>, and <code>module</code> statements
for use in exception handling.
<dt><a href=/flow#if-elsif-clause><code>elsif</code></a>
<dd>Optional clause in an <code>if</code> statement.
<dt><a href=/flow#for><code>in</code></a> <!-- xref for in specifically?
-->
<dd>Separates a list of identifiers from the object being iterated in a
<code>for</code> loop.
<dt><a href=/flow#ensure-clause><code>ensure</code></a>
<dd>Optional clause of <code>begin</code>, <code>class</code>,
<code>def</code>, and <code>module</code> statements which is executed
even if sibling clauses raise an exception.
<dt><a href=/flow#false><code>false</code></a>
<dd>Singleton instance of <code>FalseClass</code> representing
falsehood.
<dt><a href=/flow#for><code>for</code></a>
<dd>Looping construct for iterating over an object responding to
<code>:each</code>.
<dt><a href=/flow#if-statement><code>if</code></a> <!-- postfix form, also -->
<dd>Conditional statement and statement modifier.
<dt><a href=/modules#module-keyword><code>module</code></a>
<dd>Defines a module.
<dt><a href=/flow#next-statement><code>next</code></a>
<dd>Ends the current iteration of a loop or iterator and begins the
next.
<dt><a href=/flow#nil><code>nil</code></a>
<dd>Singleton instance of <code>NilClass</code> representing the
absence of a value.
<dt><a href=/flow#not-operator><code>not</code></a>
<dd>Boolean unary operator performing logical NOT.
<dt><a href=/flow#or-operator><code>or</code></a>
<dd>Boolean binary operator performing logical OR.
<!-- NOTE: No return value -->
<dt><a href=/flow#redo-statement><code>redo</code></a>
<dd>Restarts the current iteration of a loop without re-evaluating the
conditional.
<dt><a href=/flow#rescue><code>rescue</code></a>
<dd>Optional clause of <code>begin</code>, <code>class</code>,
<code>def</code>, or <code>module</code> statements that handles the
specified exceptions.
<!-- NOTE: No return value? -->
<dt><code>retry</code>
<dd>
<!-- return should be discussed in Flow > Control Statements -->
<dt><a href=/methods#return-values><code>return</code></a>
<dd>Immediately returns control from a method to its caller, along with
an optional value.
<dt><a href=#self><code>self</code></a>
<dd>Evaluates to the current object.
<dt><a href=/methods#super><code>super</code></a>
<dd>When used in a method body, invokes the method from a parent class
with the same name.
<dt><a href=/flow#true><code>true</code></a>
<dd>Singleton instance of <code>TrueClass</code> representing truth.
<!-- NOTE: No return value -->
<dt><a href=/methods#undefining><code>undef</code></a>
<dd>Removes the definition of a given method from the class in which it
was defined.
<dt><a href=/flow#unless-statement><code>unless</code></a>
<dd>Conditional statement and statement modifier.
<!-- NOTE: No return value -->
<dt><a href=/flow#until-loop><code>until</code></a>
<dd>Looping construct.
<!-- NOTE: No return value -->
<dt><a href=/flow#when><code>when</code></a>
<dd>Clause in a <code>case</code> statement.
<!-- NOTE: No return value -->
<dt><a href=/flow#while-loop><code>while</code></a>
<dd>Looping construct.
<dt><a href=/flow#yield><code>yield</code></a>
<dd>Transfers control from a method to an associated block then back.
</dl>
</article>
Jump to Line
Something went wrong with that request. Please try again.