Symbols & Methods Flashcards
To learn the basics of Ruby symbols and function, so that I may read code
1
Q
#
A
octothrope - used to make a comment
2
Q
{$0}
A
From command line, the name of the script you are running
3
Q
{variable}
A
used for interpolation of a variable / to include your variable that doesn’t have information in it yet
4
Q
$
A
attaches a variable from the command line
5
Q
%
A
Modulo that returns the remainder in division
6
Q
%d
A
represents a digit in a text string
7
Q
%s
A
represents a string of text in a test string
8
Q
( )
A
used to encapsulate arguments
9
Q
*
A
multiplication
10
Q
+
A
addition
11
Q
-
A
subtraction
12
Q
/
A
division
13
Q
<
A
less than
14
Q
«TEXT TEXT
A
to start and end a chunk of code that will not be read by ruby
15
Q
<=
A
less than or equal to
16
Q
>
A
greater than