Skip to content

Instantly share code, notes, and snippets.

@laurenhavertz
Last active December 18, 2015 19:19
Show Gist options
  • Save laurenhavertz/5832598 to your computer and use it in GitHub Desktop.
Save laurenhavertz/5832598 to your computer and use it in GitHub Desktop.
WDI Action Adventure

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

def construct_html_tag ""

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment