Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
0Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
Ruby

Ruby

Ratings:

3.83

(6)
|Views: 2,392 |Likes:
Published by kuranai

More info:

Published by: kuranai on Mar 11, 2007
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

01/01/2013

pdf

text

original

 
 
Free study notes on RubyBySatish Talim 
 
Free Study Notes on Ruby
Free Study notes on Ruby
Copyright © 2006All rights reserved.Author:
 You may freely copy and distribute this eBook as long as you do notmodify the text or remove this copyright notice. You must not makeany charge for this eBook.Notice: These notes are to be used for reference purposes only. Theauthor will not accept any liability for any damage caused by the useof this material.Revised Edition – 8
th
Feb. 2007First Edition – June 2006Satish Talim:http://rubylearning.com/ 
1
 
Free Study Notes on Ruby
Table of Contents
Learn Ruby with me.......................................................................................................5Preamble ....................................................................................................................5Assumptions...............................................................................................................5Using this eBook........................................................................................................5What is Ruby?............................................................................................................7How Ruby can help you, in more detail ....................................................................7Downloading Ruby and an Editor..............................................................................7Ruby Programming Environment..............................................................................8Our First Ruby program.................................................................................................9Some Features of Ruby................................................................................................11Numbers in Ruby.........................................................................................................12Operators and Precedence....................................................................................13Fun with Strings...........................................................................................................15Variables and Assignment...........................................................................................16Scope............................................................................................................................18Global scope and global variables.......................................................................18Built-in global variables.......................................................................................18Local scope..........................................................................................................18Getting input................................................................................................................19Names in Ruby.............................................................................................................20More on methods.........................................................................................................22Writing Own Methods in Ruby....................................................................................23Intercepting unrecognized messages with method_missing................................25More on the String class ..............................................................................................27Listing all methods of a class or object................................................................28Comparing two strings for equality.....................................................................28Simple Constructs in Ruby..........................................................................................30Case Expressions .................................................................................................31Arrays in Ruby.............................................................................................................32Ranges..........................................................................................................................35Blocks and Procs..........................................................................................................36Random Numbers........................................................................................................39Reading from / Writing to text files.............................................................................40Traversing Directory Trees..................................................................................40Random Access....................................................................................................40Writing our own Class.................................................................................................42Literal Constructors .............................................................................................44Garbage Collection..............................................................................................44Class Methods......................................................................................................45Self - The current/default object..................................................................................46Including Other Files...................................................................................................49Open classes.................................................................................................................51Inheritance....................................................................................................................52Duck Typing................................................................................................................55Overloading Methods...................................................................................................57Overriding Methods.....................................................................................................58Symbols........................................................................................................................59Hashes..........................................................................................................................61
Satish Talim:http://rubylearning.com/ 
2

Activity (0)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Milind Jaiswal liked this
mohanchaudhari liked this
manojmis2010 liked this
mubitag liked this
phpserver liked this
Jose Rafael Cruz liked this
aspgeek 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)//-->