Railsbridge Ruby

Contents

Site List

Ruby

Goal

To teach you Ruby we are going to explain the basic building blocks used in the ruby language and allow you reinforce what you've learned through challenges.

When you have completed this curriculum you should understand:

  • The command line and why we use it
  • How to run your Ruby code interactively (irb) or from a file
  • Simple types like numbers, strings, and booleans
  • Data structures like arrays and hashes
  • Object concepts like Classes

Requirements

We're going to be working with:

  • ruby 1.9.3 installed via rvm (mac or linux) or railsinstaller (windows)
  • a command line program like Terminal (mac) or CMD.EXE (windows)
  • the text editor of your choice

Everything should be set up the night before during our installfest. Please ensure you have everything working before you show up for the workshop proper.

You can verify that you have everything working by trying this out in your terminal:

$ irb
>> 1 + 2
=> 3
$

If you can do that, you are probably good to go.

Format

Each lesson will look like this:

Step Title

Goal:

Description of the current step.

Red because big goals are scary.

Steps:

steps to take.
def code_to_write
  1 + 1
end

Yellow because we've gotten it done, but we have no clue what's going on.

Explanation

Details of what the steps actually did... spell out the cause and effect.

Green because we can tie everything together now.

Next Step:

Railsbridge Docs

Source: https://github.com/railsbridge/docs