Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Source code from the book Eloquent Ruby
Ruby Perl
branch: master
Failed to load latest commit information.
01 Updated to work with late model Ruby, a few changes to gems
02 Updated to work with late model Ruby, a few changes to gems
03 Updated to work with late model Ruby, a few changes to gems
04 Updated to work with late model Ruby, a few changes to gems
05 Updated to work with late model Ruby, a few changes to gems
06 Updated to work with late model Ruby, a few changes to gems
07 Updated to work with late model Ruby, a few changes to gems
08 Updated to work with late model Ruby, a few changes to gems
09 Updated to work with late model Ruby, a few changes to gems
10 Updated to work with late model Ruby, a few changes to gems
11 Updated to work with late model Ruby, a few changes to gems
12 Updated to work with late model Ruby, a few changes to gems
13 Updated to work with late model Ruby, a few changes to gems
14 Updated to work with late model Ruby, a few changes to gems
15 Updated to work with late model Ruby, a few changes to gems
16 Updated to work with late model Ruby, a few changes to gems
17 Updated to work with late model Ruby, a few changes to gems
18 Updated to work with late model Ruby, a few changes to gems
19 Updated to work with late model Ruby, a few changes to gems
20 Updated to work with late model Ruby, a few changes to gems
21 Updated to work with late model Ruby, a few changes to gems
22 Updated to work with late model Ruby, a few changes to gems
23 Updated to work with late model Ruby, a few changes to gems
24 Updated to work with late model Ruby, a few changes to gems
25 Updated to work with late model Ruby, a few changes to gems
26 Updated to work with late model Ruby, a few changes to gems
27 Updated to work with late model Ruby, a few changes to gems
28 Updated to work with late model Ruby, a few changes to gems
29 Updated to work with late model Ruby, a few changes to gems
code Updated to work with late model Ruby, a few changes to gems
utils Updated to work with late model Ruby, a few changes to gems
.gitignore Make most of the changed suggested by adamstac
Gemfile Add rake to Gemfile, dropped Gemfile.lock and added a gitignore
Gemfile.lock Make most of the changed suggested by adamstac
README More about running the examples.
Rakefile Updated to work with late model Ruby, a few changes to gems
rvmrc.example Updated to work with late model Ruby, a few changes to gems

README

Eloquent Ruby Source Code
=========================

This is the source code from Russ Olsen's book Eloquent Ruby.
In this repo you will find all of the source code from the
book, organized by chapters.

Because the code here was written to be included in a book,
it is organized a little differently than the garden variety
Ruby project:

* The code for each chapter is in a directory whose name
corresponds to that chapter. Thus the code for Chapter 7
is in a directory named `07`.

* In each chapter directory you will find one or more *_spec.rb
files. These are rspec file (See Chapter 9) which drive execution
of the code. To run all of the examples, make your current directory
the very top of the repo and run `rake`. To run the code in an
individual directory, `cd` into that directory and run `rake`.
To run an individual spec file, `cd` to the appropriate directory
and run:

    rspec -I . <the file>


* Note that the `Rakefile`s run `rspec` over and over, once
for each spec file. This is generally *not* what you would
do in a normal Ruby project - normally you would run everything
in a directory in one swoop: `rspec .`. The thing is that many
of the examples from the book will construct a class and then
change it and then change it again. This is great for explaining
but means that you have to carefully isolate each example.
Something went wrong with that request. Please try again.