array
what we learn
variable
what we write it down with
- variable name has to start with a variable NOT number
object
anything in Ruby (data & behavior)iterate
going through each part of a container (array, hash, etc.)
number | type | class |
---|---|---|
123 | number | FixNum |
1.5 | number | Float |
- we decide what the data and behavior is
(Class)
In a Class, the most valuable thing we need to know to understand how it works is what the method does
- contains methods and data
Class = email template Class.new = composing a new email
.construct
used to create without having to puts
in the shell
which will tell you if it is an executable file OR if it is a built in
tips for approach:
- start bottom up (How will I know that the problem is solved?) Looking for the "result" of what we will be doing and then working backward
- work with the smallest section of code/baby chunk and then think about the whole or the loop
Thought behind testing: write code to see if it does what youe expect. -What is this going to do? -should know what the answer should be to your test
constant
variable that we want to access all the time in the class. always CAPITALIZED