Programming Ruby: The Pragmatic Programmers' Guide (Pragmatic Programmers Series) / Edition 2 by Dave Thomas, Chad Fowler, Andy Hunt | | 9780974514055 | Paperback | Barnes & Noble
Programming Ruby: The Pragmatic Programmers' Guide (Pragmatic Programmers Series) / Edition 2
  • Alternative view 1 of Programming Ruby: The Pragmatic Programmers' Guide (Pragmatic Programmers Series) / Edition 2
  • Alternative view 2 of Programming Ruby: The Pragmatic Programmers' Guide (Pragmatic Programmers Series) / Edition 2

Programming Ruby: The Pragmatic Programmers' Guide (Pragmatic Programmers Series) / Edition 2

4.5 4
by Dave Thomas, Chad Fowler, Andy Hunt
     
 

ISBN-10: 0974514055

ISBN-13: 9780974514055

Pub. Date: 10/28/2004

Publisher: Pragmatic Programmers, LLC, The

Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the scene in the Western world, the Pragmatic Programmers were there with the definitive reference manual, Programming Ruby: The Pragmatic Programmer's

Overview

Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the scene in the Western world, the Pragmatic Programmers were there with the definitive reference manual, Programming Ruby: The Pragmatic Programmer's Guide.

Now in its second edition, author Dave Thomas has expanded the famous Pickaxe book with over 200 pages of new content, covering all the improved language features of Ruby 1.8 and standard library modules. The Pickaxe contains four major sections:

  • An acclaimed tutorial on using Ruby.
  • The definitive reference to the language.
  • Complete documentation on all built-in classes, modules, and methods
  • Complete descriptions of all 98 standard libraries.

If you enjoyed the First Edition, you'll appreciate the expanded content, including enhanced coverage of installation, packaging, documenting Ruby source code, threading and synchronization, and enhancing Ruby's capabilities using C-language extensions. Programming for the World Wide Web is easy in Ruby, with new chapters on XML/RPC, SOAP, distributed Ruby, templating systems, and other web services. There's even a new chapter on unit testing.

This is the definitive reference manual for Ruby, including a description of all the standard library modules, a complete reference to all built-in classes and modules (including more than 250 significant changes since the First Edition). Coverage of other features has grown tremendously, including details on how to harness the sophisticated capabilities of irb, so you can dynamically examine and experiment with your running code. "Ruby is a wonderfully powerful and useful language, and whenever I'm working with it this book is at my side" —Martin Fowler, Chief Scientist, ThoughtWorks

Product Details

ISBN-13:
9780974514055
Publisher:
Pragmatic Programmers, LLC, The
Publication date:
10/28/2004
Series:
Pragmatic Programmers Series
Edition description:
Second Edition
Pages:
864
Product dimensions:
7.40(w) x 9.38(h) x 1.56(d)

Table of Contents

Foreword to the First Editionxxi
Foreword to the Second Editionxxiii
Prefacexxv
Road Mapxxxi
Part IFacets of Ruby
1Getting Started3
Installing Ruby3
Running Ruby5
Ruby Documentation: RDoc and ri8
2Ruby.new11
Ruby Is an Object-Oriented Language11
Some Basic Ruby13
Arrays and Hashes16
Control Structures18
Regular Expressions19
Blocks and Iterators21
Reading and 'Riting23
Onward and Upward24
3Classes, Objects, and Variables25
Inheritance and Messages27
Objects and Attributes29
Class Variables and Class Methods33
Access Control37
Variables39
4Containers, Blocks, and Iterators43
Containers43
Blocks and Iterators49
Containers Everywhere57
5Standard Types59
Numbers59
Strings61
Ranges66
Regular Expressions68
6More about Methods79
Defining a Method79
Calling a Method81
7Expressions87
Operator Expressions88
Miscellaneous Expressions89
Assignment90
Conditional Execution93
Case Expressions98
Loops100
Variable Scope, Loops, and Blocks105
8Exceptions, Catch, and Throw107
The Exception Class107
Handling Exceptions108
Raising Exceptions112
Catch and Throw114
9Modules117
Namespaces117
Mixins118
Iterators and the Enumerable Module120
Composing Modules120
Including Other Files123
10Basic Input and Output127
What Is an IO Object?127
Opening and Closing Files128
Reading and Writing Files129
Talking to Networks133
11Threads and Processes135
Multithreading135
Controlling the Thread Scheduler140
Mutual Exclusion141
Running Multiple Processes147
12Unit Testing151
Test::Unit Framework152
Structuring Tests156
Organizing and Running Tests159
13When Trouble Strikes163
Ruby Debugger163
Interactive Ruby164
Editor Support165
But It Doesn't Work!167
But It's Too Slow!170
Part IIRuby in Its Setting
14Ruby and Its World177
Command-Line Arguments177
Program Termination180
Environment Variables181
Where Ruby Finds Its Modules182
Build Environment183
15Interactive Ruby Shell185
Command Line185
Configuration190
Commands194
Restrictions196
Rtags and xmp196
16Documenting Ruby199
Adding RDoc to Ruby Code199
Adding RDoc to C Extensions207
Running RDoc211
Displaying Program Usage212
17Package Management with RubyGems215
Installing RubyGems216
Installing Application Gems216
Installing and Using Gem Libraries218
Creating Your Own Gems223
18Ruby and the Web235
Writing CGI Scripts235
Cookies244
Improving Performance247
Choice of Web Servers247
SOAP and Web Services249
More Information253
19Ruby TK255
Simple TK Application255
Widgets256
Binding Events260
Canvas261
Scrolling263
Translating from Perl/TK Documentation265
20Ruby and Microsoft Windows267
Getting Ruby for Windows267
Running Ruby Under Windows268
Win32API268
Windows Automation269
21Extending Ruby275
Your First Extension275
Ruby Objects in C278
The Jukebox Extension284
Memory Allocation293
Ruby Type System294
Creating an Extension296
Embedding a Ruby Interpreter301
Bridging Ruby to Other Languages304
Ruby C Language API305
Part IIIRuby Crystallized
22The Ruby Language317
Source Layout317
The Basic Types319
Names328
Variables and Constants330
Expressions338
Method Definition345
Invoking a Method348
Aliasing351
Class Definition352
Module Definitions354
Access Control356
Blocks, Closures, and Proc Objects356
Exceptions360
Catch and Throw362
23Duck Typing365
Classes Aren't Types366
Coding like a Duck370
Standard Protocols and Coercions371
Walk the Walk, Talk the Talk377
24Classes and Objects379
How Classes and Objects Interact379
Class and Module Definitions387
Top-Level Execution Environment393
Inheritance and Visibility393
Freezing Objects394
25Locking Ruby in the Safe397
Safe Levels398
Tainted Objects399
26Reflection, ObjectSpace, and Distributed Ruby403
Looking at Objects404
Looking at Classes405
Calling Methods Dynamically407
System Hooks410
Tracing Your Program's Execution412
Marshaling and Distributed Ruby414
Compile Time? Runtime? Anytime!419
Part IVRuby Library Reference
27Built-in Classes and Modules423
Alphabetical Listing424
28Standard Library653
Part VAppendixes
ASocket Library763
BMkmf Reference779
CSupport783
Web Sites783
Download Sites784
Usenet Newsgroup784
Mailing Lists784
DBibliography787
Index789
Summary Tables824

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >