Programming Ruby: the pragmatic programmers’ guide; [includes Ruby 1.8]

Free Download

Authors:

Edition: 2nd

ISBN: 0974514055, 9780974514055

Size: 6 MB (5802002 bytes)

Pages: 833/833

File format:

Language:

Publishing Year:

Category:

Dave Thomas, Chad Fowler, Andy Hunt0974514055, 9780974514055

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 new and 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 new and 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

Table of contents :
Preface……Page 18
Road Map……Page 25
Part I—Facets of Ruby……Page 29
Installing Ruby……Page 30
Running Ruby……Page 32
Ruby Documentation: RDoc and ri……Page 35
Ruby Is an Object-Oriented Language……Page 37
Some Basic Ruby……Page 39
Arrays and Hashes……Page 42
Control Structures……Page 44
Regular Expressions……Page 45
Blocks and Iterators……Page 47
Reading and ‘Riting……Page 49
Onward and Upward……Page 50
Classes, Objects, and Variables……Page 51
Inheritance and Messages……Page 53
Objects and Attributes……Page 55
Class Variables and Class Methods……Page 59
Access Control……Page 63
Variables……Page 65
Containers……Page 68
Blocks and Iterators……Page 74
Containers Everywhere……Page 82
Numbers……Page 83
Strings……Page 85
Ranges……Page 90
Regular Expressions……Page 92
Defining a Method……Page 102
Calling a Method……Page 104
Expressions……Page 109
Operator Expressions……Page 110
Miscellaneous Expressions……Page 111
Assignment……Page 112
Conditional Execution……Page 115
Case Expressions……Page 120
Loops……Page 122
Variable Scope, Loops, and Blocks……Page 127
The Exception Class……Page 129
Handling Exceptions……Page 130
Raising Exceptions……Page 134
Catch and Throw……Page 136
Namespaces……Page 138
Mixins……Page 139
Composing Modules……Page 141
Including Other Files……Page 144
What Is an IO Object?……Page 147
Opening and Closing Files……Page 148
Reading and Writing Files……Page 149
Talking to Networks……Page 153
Multithreading……Page 155
Controlling the Thread Scheduler……Page 160
Mutual Exclusion……Page 161
Running Multiple Processes……Page 167
Unit Testing……Page 171
Test::Unit Framework……Page 172
Structuring Tests……Page 176
Organizing and Running Tests……Page 179
Ruby Debugger……Page 183
Interactive Ruby……Page 184
Editor Support……Page 185
But It Doesn’t Work!……Page 187
But It’s Too Slow!……Page 190
Part II—Ruby in Its Setting……Page 194
Command-Line Arguments……Page 195
Program Termination……Page 198
Environment Variables……Page 199
Where Ruby Finds Its Modules……Page 200
Build Environment……Page 201
Command Line……Page 202
Configuration……Page 207
Commands……Page 211
rtags and xmp……Page 213
Adding RDoc to Ruby Code……Page 215
Adding RDoc to C Extensions……Page 223
Running RDoc……Page 227
Displaying Program Usage……Page 228
Package Management with RubyGems……Page 231
Installing Application Gems……Page 232
Installing and Using Gem Libraries……Page 234
Creating Your Own Gems……Page 239
Writing CGI Scripts……Page 250
Cookies……Page 259
Choice of Web Servers……Page 262
SOAP and Web Services……Page 264
More Information……Page 268
Simple Tk Application……Page 269
Widgets……Page 270
Binding Events……Page 274
Canvas……Page 275
Scrolling……Page 277
Translating from Perl/Tk Documentation……Page 279
Getting Ruby for Windows……Page 281
Win32API……Page 282
Windows Automation……Page 283
Your First Extension……Page 289
Ruby Objects in C……Page 292
The Jukebox Extension……Page 298
Memory Allocation……Page 307
Ruby Type System……Page 308
Creating an Extension……Page 310
Embedding a Ruby Interpreter……Page 315
Bridging Ruby to Other Languages……Page 318
Ruby C Language API……Page 319
Part III—Ruby Crystallized……Page 329
Source Layout……Page 330
The Basic Types……Page 332
Names……Page 341
Variables and Constants……Page 343
Predefined Variables……Page 346
Expressions……Page 351
Boolean Expressions……Page 354
case Expressions……Page 356
Loop Constructs……Page 357
Method Definition……Page 358
Invoking a Method……Page 361
Aliasing……Page 364
Class Definition……Page 365
Module Definitions……Page 367
Blocks, Closures, and Proc Objects……Page 369
Exceptions……Page 373
Catch and Throw……Page 375
Duck Typing……Page 377
Classes Aren’t Types……Page 378
Coding like a Duck……Page 382
Standard Protocols and Coercions……Page 383
Walk the Walk, Talk the Talk……Page 389
How Classes and Objects Interact……Page 390
Class and Module Definitions……Page 398
Inheritance and Visibility……Page 404
Freezing Objects……Page 405
Locking Ruby in the Safe……Page 407
Safe Levels……Page 408
Tainted Objects……Page 409
Reflection, ObjectSpace, and Distributed Ruby……Page 412
Looking at Objects……Page 413
Looking at Classes……Page 414
Calling Methods Dynamically……Page 416
System Hooks……Page 419
Tracing Your Program’s Execution……Page 421
Marshaling and Distributed Ruby……Page 423
Compile Time? Runtime? Anytime!……Page 428
Part IV—Ruby Library Reference……Page 429
Built-in Classes and Modules……Page 430
Alphabetical Listing……Page 431
Array……Page 434
Bignum……Page 448
Binding……Page 451
Class……Page 452
Comparable……Page 454
Continuation……Page 455
Dir……Page 456
Enumerable……Page 461
Errno……Page 467
Exception……Page 468
FalseClass……Page 471
File……Page 472
File::Stat……Page 484
FileTest……Page 490
Fixnum……Page 491
Float……Page 494
GC……Page 498
Hash……Page 499
Integer……Page 508
IO……Page 510
Kernel……Page 523
Marshal……Page 542
MatchData……Page 544
Math……Page 547
Method……Page 550
Module……Page 552
NilClass……Page 568
Numeric……Page 569
Object……Page 574
ObjectSpace……Page 585
Proc……Page 587
Process……Page 590
Process::GID……Page 596
Process::Status……Page 598
Process::Sys……Page 601
Process::UID……Page 603
Range……Page 604
Regexp……Page 607
Signal……Page 611
String……Page 613
Struct……Page 633
Struct::Tms……Page 637
Symbol……Page 638
Thread……Page 640
ThreadGroup……Page 647
Time……Page 649
TrueClass……Page 657
UnboundMethod……Page 658
Standard Library……Page 660
Abbrev……Page 662
Base64……Page 663
Benchmark……Page 664
BigDecimal……Page 665
CGI……Page 666
CGI::Session……Page 668
Complex……Page 669
CSV……Page 670
Curses……Page 671
Date/DateTime……Page 672
DBM……Page 673
Delegator……Page 674
Digest……Page 675
DL……Page 676
dRuby……Page 677
English……Page 678
Enumerator……Page 679
erb……Page 680
Etc……Page 682
expect……Page 683
Fcntl……Page 684
FileUtils……Page 685
Find……Page 686
Forwardable……Page 687
ftools……Page 688
GDBM……Page 689
Generator……Page 690
GetoptLong……Page 691
GServer……Page 692
Iconv……Page 693
IO/Wait……Page 694
IPAddr……Page 695
jcode……Page 696
Logger……Page 697
Mail……Page 698
mathn……Page 699
Matrix……Page 701
Monitor……Page 702
Mutex……Page 703
Mutex_m……Page 704
Net::FTP……Page 705
Net::HTTP……Page 706
Net::IMAP……Page 708
Net::POP……Page 709
Net::SMTP……Page 710
Net::Telnet……Page 711
NKF……Page 712
Observable……Page 713
open-uri……Page 714
Open3……Page 715
OpenSSL……Page 716
OpenStruct……Page 717
OptionParser……Page 718
ParseDate……Page 720
Pathname……Page 721
PP……Page 722
PrettyPrint……Page 723
Profile……Page 724
Profiler__……Page 725
PStore……Page 726
PTY……Page 727
Rational……Page 728
readbytes……Page 729
Readline……Page 730
Resolv……Page 731
REXML……Page 732
Rinda……Page 734
RSS……Page 735
Scanf……Page 736
SDBM……Page 737
Set……Page 738
Shellwords……Page 739
Singleton……Page 740
SOAP……Page 741
Socket……Page 742
StringIO……Page 743
StringScanner……Page 744
Sync……Page 745
Syslog……Page 747
Tempfile……Page 748
Test::Unit……Page 749
thread……Page 750
ThreadsWait……Page 751
Time……Page 752
Timeout……Page 753
Tk……Page 754
tmpdir……Page 755
Tracer……Page 756
TSort……Page 757
un……Page 758
URI……Page 759
WeakRef……Page 760
WEBrick……Page 761
Win32API……Page 762
WIN32OLE……Page 763
XMLRPC……Page 764
YAML……Page 765
Zlib……Page 766
Part V—Appendixes……Page 767
Socket Library……Page 768
BasicSocket……Page 769
Socket……Page 771
IPSocket……Page 775
TCPSocket……Page 776
SOCKSSocket……Page 777
TCPServer……Page 778
UDPSocket……Page 779
UNIXSocket……Page 781
UNIXServer……Page 782
mkmf……Page 783
Web Sites……Page 786
Mailing Lists……Page 787
Summary Tables……Page 789

Reviews

There are no reviews yet.

Be the first to review “Programming Ruby: the pragmatic programmers’ guide; [includes Ruby 1.8]”
Shopping Cart
Scroll to Top