Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

Praise for the First Edition

Preface

Preface to the First Edition

Acknowledgments

About this Book

About the Cover Illustration

1. Ruby foundations

Chapter 1. Bootstrapping your Ruby literacy

1.1. Basic Ruby language literacy

1.1.1. A Ruby syntax survival kit

1.1.2. The variety of Ruby identifiers

1.1.3. Method calls, messages, and Ruby objects

1.1.4. Writing and saving a simple program

1.1.5. Feeding the program to Ruby

1.1.6. Keyboard and file I/O

1.2. Anatomy of the Ruby installation

1.2.1. The Ruby standard library subdirectory (RbConfig::CONFIG[rubylibdir])

1.2.2. The C extensions directory (RbConfig::CONFIG[archdir])

1.2.3. The site_ruby (RbConfig::CONFIG[sitedir]) and vendor_ruby (RbConfig::CONFIG[vendordir]) directories

1.2.4. The gems directory

1.3. Ruby extensions and programming libraries

1.3.1. Loading external files and extensions

1.3.2. ���Load���-ing a file in the default load path

1.3.3. ���Require���-ing a feature

1.3.4. require_relative

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

1.4.1. Interpreter command-line switches

1.4.2. A closer look at interactive Ruby interpretation with irb

1.4.3. ri and RDoc

1.4.4. The rake task-management utility

1.4.5. Installing packages with the gem command

1.5. Summary

Chapter 2. Objects, methods, and local variables

2.1. Talking to objects

2.1.1. Ruby and object orientation

2.1.2. Creating a generic object