Back to -Tutorials -Sapphire (Ruby In Steel) Tutorials -Programming

The Little Book Of Ruby

The Fastest, Easiest Way To Learn Ruby ‘by example’

Download our free eBook and Ruby source code to get up to speed with Ruby in ten easy chapters.

Note: A revised 3rd edition of The Little Book Of Ruby, to accompany an in-depth interactive course of (all-new) videos is available, by subscription, exclusively at:

Free eBook

10 Chapters – 87 pages…

PDF - 565.1 kb
Download The Little Book of Ruby - 1.1MB

The Little Book Of Ruby is a PDF eBook which will guide you through the fundamentals of Ruby programming. Starting with the basics (strings, numbers, objects and methods) it quickly moves on to explain all you need to know to create your own class hierarchies, use arrays, hashes, iterators, modules, mixins and much more besides…

- See also: The Book Of Ruby

Free Source Code

More than 50 little sample programs demonstrate every topic in the book…

Download this Zip file for use with Ruby In Steel 2008 or any other editor/IDE...

Zip - 34.5 kb
Source Archive (compatible with Ruby In Steel in VS2008)

(Or, if you are using Ruby In Steel with Visual Studio 2005, download this one...)

Zip - 30.9 kb
Source Archive (compatible with Ruby In Steel in VS2005)

You can load these source files into any Ruby editor or IDE. If you are using Ruby In Steel you may be able to load the entire project as a solution (depending on which version of the software you are using). Or you can import it to a new directory (File/New Project/Import) or, using Ruby In Steel Developer, you may Convert it ’in place’ (File/Open/Convert). Each program can be run in Ruby In Steel’s interactive console just by pressing CTRL-F5.

Table of Contents

Introduction: Welcome To The Little Book Of Ruby

- Learn Ruby In Ten Chapters
- What Is Ruby?
- What Is Rails?
- Download Ruby plus an Editor
- Get The Source Code Of The Sample Programs
- Running Ruby Programs
- How To Use This Book
- Making Sense Of The Text

Chapter One: Strings and Methods

- Strings and Embedded Evaluation
- Methods
- Numbers
- Testing a Condition: if … then

Chapter Two: Classes and Objects

- Instances and Instance Variables
- Constructors – new and initialize
- Inspecting Objects

Chapter Three: Class Hierarchies

- Superclasses and Subclasses

Chapter Four: Accessors, Attributes, Class Variables

- Accessor Methods
- Attribute Readers and Writers
- Attributes Create Variables
- Calling Methods of a Superclass
- Class Variables

Chapter Five: Arrays

- Using Arrays
- Creating Arrays
- Multi-Dimensional Arrays
- Iterating Over Arrays
- Indexing Into Arrays

Chapter Six: Hashes

- Creating Hashes
- Indexing Into A Hash
- Hash Operations

Chapter Seven: Loops and Iterators

- For Loops
- Blocks
- While Loops
- While Modifiers
- Until Loops

Chapter Eight: Conditional Statements

- If..Then..Else
- And..Or..Not
- If..Elsif
- Unless
- If and Unless Modifiers
- Case Statements

Chapter Nine: Modules and Mixins

- A Module Is Like A Class…
- Module Methods
- Modules as Namespaces
- Module ‘Instance Methods’
- Included Modules or ‘Mixins’
- Including Modules From Files
- Pre-Defined Modules

Chapter Ten: Saving Files, Moving On…

- Saving Data
- Files
- Moving On…

Bookmark and Share   Keywords:  downloads  ruby
© SapphireSteel Software 2014