software-development-lessons

Interactive Ruby

This lesson goes over interactive ruby (irb): why and how we use it

Slides

Topics

Interactive Ruby

Scenario

Shell

  1. open a terminal
  2. In a terminal you can enter ruby --version or ruby -v to check version
  3. Make sure you are using the correct version in Ruby Docs
  4. type irb and hit enter
  5. You are now in the irb shell
  6. Play around with ruby.
    • Create a variable. name = "ian"
    • Print to I/O. puts name
    • etc.
  7. Type exit and hit enter to exit irb shell

Resources

Ruby Docs

Ruby Docs

Unix

Commands Cheatsheet

Next Up

Workspace