Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
6Activity
P. 1
The Little Book of Ruby

The Little Book of Ruby

Ratings: (0)|Views: 3,541|Likes:
Published by Sonu Rai
The Little Book of Ruby
The Little Book of Ruby

More info:

Published by: Sonu Rai on Feb 14, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/23/2011

pdf

text

original

 
Y
OUR
F
REE
G
UIDE
T
O
P
ROGRAMMING
R
UBYFROM
.
.
IN
 
ASSOCIATION
 
WITH
 
B
ITWISE
M
AGAZINE
 
The Little Book Of Ruby :: ::www.sapphiresteel.com:: page 2
The Little Book Of Ruby
Copyright © 2006 Dark Neon Ltd.All rights reserved.
written by
Huw CollingbourneDownload source code from:http://www.sapphiresteel.comYou may freely copy and distribute this eBook as long as you do not modifythe text or remove this copyright notice. You must not make any charge forthis eBook.The Little Book of Ruby is produced in association with Rosedown Mill Ltd.,makers of the Steel IDE for Visual Studio (www.sapphiresteel.com) andBitwise Magazine – the online magazine for developers(www.bitwisemag.com
 
).First edition: June 2006
 
The Little Book Of Ruby :: ::www.sapphiresteel.com:: page 3
Table of Contents
Welcome To The Little Book Of Ruby...........................................................................5Learn Ruby In Ten Chapters…..............................................................................5What Is Ruby?.......................................................................................................5What Is Rails?........................................................................................................5Download Ruby plus an Editor ..............................................................................6Get The Source Code Of The Sample Programs...................................................6Running Ruby Programs........................................................................................6How To Use This Book ..........................................................................................7Making Sense Of The Text....................................................................................7Chapter One.....................................................................................................................8Strings and Embedded Evaluation.......................................................................11Methods...............................................................................................................12 Numbers...............................................................................................................14Testing a Condition: if … then.............................................................................15Chapter Two..................................................................................................................17Instances and Instance Variables..........................................................................18Constructors – new and initialize.........................................................................21Inspecting Objects................................................................................................22Chapter Three................................................................................................................25Superclasses and Subclasses................................................................................28Chapter Four .................................................................................................................30Accessor Methods................................................................................................30Attribute Readers and Writers..............................................................................32Attributes Create Variables..................................................................................34Calling Methods of a Superclass.........................................................................37Class Variables.....................................................................................................38Chapter Five..................................................................................................................40Using Arrays........................................................................................................40Creating Arrays....................................................................................................41Multi-Dimensional Arrays...................................................................................43Iterating Over Arrays...........................................................................................45Indexing Into Arrays............................................................................................46Chapter Six....................................................................................................................48Creating Hashes...................................................................................................48Indexing Into A Hash...........................................................................................50

Activity (6)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
mateer6 liked this
Mateusz Sienkan liked this
Jose Rafael Cruz liked this
dustinfranklin liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->