Symbol review Flashcards
\
Escape backslash
'
Escape single-quote (‘)
"
Escape double-quote (“)
\a
Escape bell
\b
Escape backspace
\f
Escape formfeed
\n
Escape newline
\r
Escape carriage
\t
Escape Tab (TAB)
\v
Escape vertical tab
BEGIN
Run this block when the script starts.
END
Run this block when the script is done.
alias
Create another name for a function.
and
Logical and, but lower priority than &&.
begin
Start a block, usually for exceptions.
break
Break out of a loop.
case
Case style conditional, like an if.
class
Define a new class.
def
Define a new function.
defined?
Is this class/function/etc. defined already?
do
Create a block that maybe takes a parameter.
else
Else conditional.
elsif
Else if conditional
end
Ends blocks, functions, classes, etc.
ensure
Run this code whether an exception happens or not.
for
For loop syntax. *The .each syntax is preferred.
if
If conditional.
in
In part of for-loops.
module
Define a new module.
next
Skip to the next element of a .each iterator.
not
Logical not. *use ! instead.
or
Logical or.