Programming
Back to Tutorials Ruby In Steel Tutorials ProgrammingThe Little Book Of Ruby
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: http://www.udemy.com/learn-ruby-programming-in-ten-easy-steps |
Free eBook
10 Chapters - 87 pages...
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...
(Or, if you are using Ruby In Steel with Visual Studio 2005, download this one...)
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
YAML
Files
Moving On...