The Ruby Programming Language: Everything You Need to Know

The Ruby Programming Language: Everything You Need to Know

4.7 4

NOOK Book(eBook)

$17.99 $31.99 Save 44% Current price is $17.99, Original price is $31.99. You Save 44%.
View All Available Formats & Editions
Available on Compatible NOOK Devices and the free NOOK Apps.
Want a NOOK ? Explore Now

Overview

The Ruby Programming Language: Everything You Need to Know by David Flanagan, Yukihiro Matsumoto

The Ruby Programming Language is the authoritative guide to Ruby and provides comprehensive coverage of versions 1.8 and 1.9 of the language. It was written (and illustrated!) by an all-star team:

  • David Flanagan, bestselling author of programming language "bibles" (including JavaScript: The Definitive Guide and Java in a Nutshell) and committer to the Ruby Subversion repository.


  • Yukihiro "Matz" Matsumoto, creator, designer and lead developer of Ruby and author of Ruby in a Nutshell, which has been expanded and revised to become this book.


  • why the lucky stiff, artist and Ruby programmer extraordinaire.
This book begins with a quick-start tutorial to the language, and then explains the language in detail from the bottom up: from lexical and syntactic structure to datatypes to expressions and statements and on through methods, blocks, lambdas, closures, classes and modules.

The book also includes a long and thorough introduction to the rich API of the Ruby platform, demonstrating -- with heavily-commented example code -- Ruby's facilities for text processing, numeric manipulation, collections, input/output, networking, and concurrency. An entire chapter is devoted to Ruby's metaprogramming capabilities.

The Ruby Programming Language documents the Ruby language definitively but without the formality of a language specification. It is written for experienced programmers who are new to Ruby, and for current Ruby programmers who want to challenge their understanding and increase their mastery of the language.

Product Details

ISBN-13: 9780596554651
Publisher: O'Reilly Media, Incorporated
Publication date: 01/25/2008
Sold by: Barnes & Noble
Format: NOOK Book
Pages: 448
Sales rank: 637,784
File size: 3 MB

About the Author

David Flanagan is a computer programmer who spends most of his time writing about JavaScript and Java. His books with O'Reilly include JavaScript: The Definitive Guide, JavaScript Pocket Reference, Java in a Nutshell, Java Examples in a Nutshell, and Java Foundation Classes in a Nutshell. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and children in the U.S. Pacific Northwest bewteen the cities of Seattle, Washington and Vancouver, British Columbia. David has a blog at www.davidflanagan.com.

Yukihiro Matsumoto ("Matz"), the creator of Ruby, is a professional programmer who worked for the Japanese open source company, netlab.jp. Matz is also known as one of the open source evangelists in Japan. He's released several open source products, including cmail, the emacs-based mail user agent, written entirely in emacs lisp. Ruby is his first piece of software that has become known outside of Japan.

Table of Contents

Preface     ix
Introduction     1
A Tour of Ruby     2
Try Ruby     11
About This Book     15
A Sudoku Solver in Ruby     17
The Structure and Execution of Ruby Programs     25
Lexical Structure     26
Syntactic Structure     33
File Structure     35
Program Encoding     36
Program Execution     39
Datatypes and Objects     41
Numbers     42
Text     46
Arrays     64
Hashes     67
Ranges     68
Symbols     71
True, False, and Nil     72
Objects     72
Expressions and Operators     85
Literals and Keyword Literals     86
Variable References     87
Constant References     88
Method Invocations     89
Assignments     92
Operators     100
Statements and Control Structures     117
Conditionals     118
Loops     127
Iterators and Enumerable Objects     130
Blocks     140
Altering ControlFlow     146
Exceptions and Exception Handling     154
BEGIN and END     165
Threads, Fibers, and Continuations     166
Methods, Procs, Lambdas, and Closures     175
Defining Simple Methods     177
Method Names     180
Methods and Parentheses     183
Method Arguments     185
Procs and Lambdas     192
Closures     200
Method Objects     203
Functional Programming     205
Classes and Modules     213
Defining a Simple Class     214
Method Visibility: Public, Protected, Private     232
Subclassing and Inheritance     234
Object Creation and Initialization     241
Modules     247
Loading and Requiring Modules     252
Singleton Methods and the Eigenclass     257
Method Lookup     258
Constant Lookup     261
Reflection and Metaprogramming     265
Types, Classes, and Modules     266
Evaluating Strings and Blocks     268
Variables and Constants     271
Methods     272
Hooks     277
Tracing      279
ObjectSpace and GC     281
Custom Control Structures     281
Missing Methods and Missing Constants     284
Dynamically Creating Methods     287
Alias Chaining     290
Domain-Specific Languages     296
The Ruby Platform     303
Strings     304
Regular Expressions     310
Numbers and Math     321
Dates and Times     325
Collections     328
Files and Directories     350
Input/Output     356
Networking     366
Threads and Concurrency     372
The Ruby Environment     389
Invoking the Ruby Interpreter     390
The Top-Level Environment     394
Practical Extraction and Reporting Shortcuts     403
Calling the OS     405
Security     409
Index     413

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews

Ruby Programming Language 4.8 out of 5 based on 0 ratings. 4 reviews.
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago