Definitions of keywords Flashcards
Learn the keywords to perform the action described by the definition
Run this block when the script starts
BEGIN
Run this block when the script is done
END
create another name for a function
alias
Logical and, but lower priority than &&
and
Start a block, usually for exceptions
begin
break out of a loop right now
break
Case style conditional, like an if
case
Define a new class
class
define a new function
def
Is this class/function/etc. defined already?
defined?
Create a block that maybe takes a parameter
do
Else conditional
else
Else if conditional
elsif
Ends blocks, functions, classes, everything
end
Run this code whether an exception happens or not
ensure
Run this code whether an exception happens or not
ensure
For loop syntax. The .each syntax is preferred
for
If conditional
if
In part of for-loops
in
Define a new module
module
skip to the next element of a .each iterator
next
logical not. But use ! instead
not
Logical or.
or
Rerun a code block exactly the same
redo