Chapter 1. Bootstrapping your Ruby literacy

 

This chapter covers

  • A Ruby syntax survival kit
  • Writing, saving, running, and error-checking programs
  • A tour of the Ruby installation
  • The mechanics of Ruby extensions
  • Ruby’s command-line tools such as irb and rake

This book will give you a foundation in Ruby, and this chapter will give your foundation a foundation. The goal of the chapter is to bootstrap you into the study of Ruby with enough knowledge and skill to proceed comfortably into what lies beyond.

We’ll look at basic Ruby syntax and techniques and at how Ruby works: what you do when you write a program, how you get Ruby to run your program, and how you split a program into more than one file. You’ll learn several of the switches that alter how the Ruby interpreter (the program with the name ruby, to which you feed your program files for execution) acts, as well as how to use some important auxiliary tools designed to make your life as a Rubyist easier and more productive.

The chapter is based on a view of the whole Ruby landscape as being divided into three fundamental levels:

  • Core language: design principles, syntax, and semantics
  • Extensions and libraries that ship with Ruby, and the facilities for adding extensions of your own
  • Command-line tools that come with Ruby, with which you run the interpreter and some other important utilities

1.1. Basic Ruby language literacy

1.2. Anatomy of the Ruby installation

1.3. Ruby extensions and programming libraries

1.4. Out-of-the-box Ruby tools and applications

Summary

sitemap