Chapter 1. Bootstrapping your Ruby literacy
- A Ruby syntax survival kit
- Tour of the Ruby installation
- Walk-throughs of sample Ruby programs
- The mechanics of Ruby extensions
- Ruby’s out-of-the-box command-line tools
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’re going to 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 variations on the process of running the Ruby interpreter (the program with the name ruby, to which you feed your program files for execution) 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:
- The core language: design principles, syntax, semantics
- The extensions and libraries that ship with Ruby, and the facilities for adding extensions of your own
- The command-line tools that come with Ruby, with which you run the interpreter as well as some other important utilities.