Programming Ruby 1.9: the pragmatic programmers' guide
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Raleigh, NC [u.a.]
The Pragmatic Bookshelf
2009
|
Schriftenreihe: | The facets of ruby series
The pragmatic programmers |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | Previous ed.: 2005 |
Beschreibung: | XXVIII, 930 S. Ill. 23 cm |
ISBN: | 9781934356081 1934356085 |
Internformat
MARC
LEADER | 00000nam a22000002c 4500 | ||
---|---|---|---|
001 | BV035943763 | ||
003 | DE-604 | ||
005 | 20100413 | ||
007 | t | ||
008 | 100108s2009 a||| |||| 00||| eng d | ||
020 | |a 9781934356081 |9 978-1-934356-08-1 | ||
020 | |a 1934356085 |9 1-934356-08-5 | ||
035 | |a (OCoLC)604912831 | ||
035 | |a (DE-599)BSZ302476911 | ||
040 | |a DE-604 |b ger | ||
041 | 0 | |a eng | |
049 | |a DE-83 |a DE-92 | ||
080 | |a 004.43 | ||
082 | 0 | |a 005.133 |2 22 | |
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
100 | 1 | |a Thomas, David |e Verfasser |4 aut | |
245 | 1 | 0 | |a Programming Ruby 1.9 |b the pragmatic programmers' guide |c Dave Thomas with Chad Fowler and Andy Hunt |
264 | 1 | |a Raleigh, NC [u.a.] |b The Pragmatic Bookshelf |c 2009 | |
300 | |a XXVIII, 930 S. |b Ill. |c 23 cm | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a The facets of ruby series | |
490 | 0 | |a The pragmatic programmers | |
500 | |a Previous ed.: 2005 | ||
650 | 4 | |a Ruby (Computer program language) | |
650 | 0 | 7 | |a Ruby |g Programmiersprache |0 (DE-588)4653817-3 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Ruby |g Programmiersprache |0 (DE-588)4653817-3 |D s |
689 | 0 | |5 DE-604 | |
700 | 1 | |a Fowler, Chad |e Verfasser |0 (DE-588)139216308 |4 aut | |
700 | 1 | |a Hunt, Andrew |d 1964- |e Verfasser |0 (DE-588)133675025 |4 aut | |
856 | 4 | 2 | |m HBZ Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018800953&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-018800953 |
Datensatz im Suchindex
_version_ | 1804140932195418112 |
---|---|
adam_text | Titel: Programming Ruby 1.9
Autor: Thomas, Dave
Jahr: 2009
Contents
Foreword xix
Preface xxi
Road Map xxvii
Part I—Facets of Ruby
1 Getting Started 3
The Command Prompt 3
Installing Ruby 5
Running Ruby 8
Ruby Documentation: RDoc and ri 11
2 RUBY.NEW 13
Ruby Is an Object-Oriented Language 13
Some Basic Ruby 15
Arrays and Hashes 18
Symbols 20
Control Structures 21
Regular Expressions 23
Blocks and Iterators 24
Reading and Riting 26
Command-Line Arguments 27
Onward and Upward 27
3 Classes, Objects, and Variables 29
Objects and Attributes 32
Classes Working with Other Classes 37
Access Control 40
Variables 43
4 Containers, Blocks, and Iterators 47
Blocks and Iterators 54
Containers Everywhere 70
5 Sharing Functionality: Inheritance, Modules, and Mix-
ins 71
Inheritance and Messages 71
Modules 76
Mixins 78
Iterators and the Enumerable Module 80
Composing Modules 81
Inheritance, Mixins, and Design 84
6 Standard Types 87
Numbers 87
Strings 90
Ranges 95
7 Regular Expressions 99
What Regular Expressions Let You Do 99
Ruby s Regular Expressions 100
Digging Deeper 102
Pattern-Based Substitution 110
Advanced Regular Expressions 112
8 More About Methods 119
Defining a Method 119
Calling a Method 122
9 Expressions 129
Operator Expressions 130
Miscellaneous Expressions 132
Assignment 133
Conditional Execution 136
Case Expressions 141
Loops 143
Variable Scope. Loops, and Blocks 148
10 Exceptions, Catch, and Throw 151
The Exception Class 151
Handling Exceptions 152
Raising Exceptions 156
Catch and Throw 158
11 Basic Input and Output 161
What Is an 10 Object? 161
Opening and Closing Files 162
Reading and Writing Files 163
Talking to Networks 166
12 Fibers, Threads, and Processes 169
Fibers 169
Multithreading 171
Controlling the Thread Scheduler 175
Mutual Exclusion 176
Running Multiple Processes 179
13 Unit Testing 183
The Testing Framework 185
Structuring Tests 189
Organizing and Running Tests 191
RSpec and Shoulda 194
14 When Trouble Strikes 205
Ruby Debugger 205
Interactive Ruby 206
Editor Support 207
But It Doesn t Work! 209
But It s Too Slow! 212
Part li—Ri by i Its Sri rise;
15 Ruby and Its World 219
Command-Line Arguments 219
Program Termination 222
Environment Variables 223
Where Ruby Finds Its Libraries 224
RubyGems Integration 225
The Rake BuiidTooI 231
Build Environment 234
16 Namespaces, Source Files, and Distribution 235
Namespaces 235
Organizing Your Source 237
Distributing and Installing Your Code 244
17 Character Encoding 251
Encodings 252
Source Files 253
Transcoding 257
Input and Output Encoding 259
Default External Encoding 261
Encoding Compatibility 262
Default Internal Encoding 263
Fun with Unicode 264
18 Interactive Ruby Shell 265
Command Line 265
Configuration 269
Commands 273
Restrictions 275
19 Documenting Ruby 277
Adding RDoc to Ruby Code 280
Adding RDoc to C Extensions 285
Running RDoc 286
20 Ruby and the Web 291
Writing CGI Scripts 291
Cookies 300
Choice of Web Servers 301
Frameworks 302
21 Ruby and Microsoft Windows 303
Getting Ruby for Windows 303
Running Ruby Under Windows 304
Win32API 304
Windows Automation 305
Part III—Ruby Crystallized
22 The Ruby Language 313
Source File Encoding 313
Source Layout 313
The Basic Types 315
Names 322
Variables and Constants 324
Predefined Variables 327
Expressions 332
Boolean Expressions 335
if and unless Expressions 337
case Expressions 337
Loop Constructs 338
Method Definition 339
Invoking a Method 343
Aliasing 346
Class Definition 346
Module Definitions 348
Access Control 350
Blocks, Closures, and Proc Objects 351
Exceptions 355
Catch and Throw 357
23 Duck Typing 359
Classes Aren t Types 360
Coding like a Duck 364
Standard Protocols and Coercions 365
Walk the Walk, Talk the Talk 372
24 Metaprogramming 373
Objects and Classes 373
Singletons 376
Inheritance and Visibility 382
Modules and Mixins 383
Metaprogramming Class-Level Macros 386
Two Other Forms of Class Definition 391
instance_eval and class_eval 395
Hook Methods 399
One Last Example 404
Top-Level Execution Environment 406
The Turtle Graphics Program 407
25 Reflection, ObjectSpace, and Distributed Ruby 409
Looking at Objects 409
Looking at Classes 411
Calling Methods Dynamically 412
System Hooks 415
Tracing Your Program s Execution 416
Behind the Curtain: The Ruby VM 419
Marshaling and Distributed Ruby 420
Compile Time? Runtime? Anytime! 424
26 Locking Ruby in the Safe 425
Safe Levels 426
Tainted Objects 427
Trusted Objects 427
Part IV—Ri by Library Rkfkrknck
27 Built-in Classes and Modules 433
Alphabetical Listing 434
Array 438
BasicObject 454
Bignum 457
Binding 460
Class 461
Comparable 463
Complex 464
Dir 469
Encoding 474
Enumerable 478
Enumerator 487
Errno 491
Exception 492
FalseClass 495
Fiber 496
File 497
File::Stat 509
FileTest 515
Fixnum 516
Float 519
GC 523
Hash 524
Integer 534
IO 537
Kernel 555
Marshal 574
MatchData 576
Math 579
Method 582
Module 585
Mutex 603
NilClass 604
Numeric 606
Object 613
ObjectSpace 626
Proc 628
Process 632
Process::GID 639
Process::Status 641
Process::Sys 644
Process::UID 646
Range 647
Rational 651
Regexp 654
Signal 659
String 661
Struct 687
Struct::Tms 691
Symbol 692
Thread 696
ThreadGroup 703
Time 705
TrueClass 714
UnboundMethod 715
28 Standard Library 717
Library Changes in Ruby 1.9 718
Abbrev 720
Base64 721
Benchmark 722
BigDecimal 723
CGI 724
CGI::Session 726
CMath 727
Complex 728
Continuation 729
CSV 730
Curses 732
Date/DateTime 733
DBM 734
Delegator 735
Digest 736
DL 737
dRuby 738
English 739
erb 740
Etc 742
expect 743
Fcntl 744
Fiber 745
FileUtils 746
Find 747
Forwardable 748
GDBM 749
GetoptLong 750
GServer 751
Iconv 752
IO/Wait 753
IPAddr 754
irb 755
json 756
Logger 757
mathn 758
Matrix 760
MiniTest 761
Monitor 762
Mutex_m 763
Net::FTP 764
Net::HTTP 765
Net::IMAP 767
Net::POP 768
Net::SMTP 769
Net::Telnet 770
NKF 771
Observable 772
open-uri 773
Open3 774
OpenSSL 775
OptionParser 776
OpenStruct 778
Pathname 779
PP 780
PrettyPrint 781
prime 782
Profile 783
Profiler 784
PStore 785
PTY 786
Rational 787
Readline 788
Resolv 789
REXML 790
Rinda 792
Ripper 793
RSS 795
Scanf 796
SDBM 797
SecureRandom 798
Set 799
Shellwords 800
Singleton 801
Socket 802
StringlO 803
StringScanner 804
Syslog 805
Tempfile 806
Test::Unit 807
thread 808
ThreadsWait 809
Time 810
Timeout 811
Tk 812
tmpdir 813
Tracer 814
TSort 815
un 816
URI 817
WeakRef 818
WEBrick 819
WIN32OLE 820
XMLRPC 821
YAML 822
Zlib 823
29 Extending Ruby 825
Your First Extension 825
Ruby Objects in C 828
The Threading Model 833
The Jukebox Extension 837
Memory Allocation 844
Ruby Type System 845
Creating an Extension 847
Embedding a Ruby Interpreter 852
Bridging Ruby to Other Environments 856
Ruby C Language API 857
MKMF Reference 866
mkmf 866
I*AKT V—AlM I NIHXIS
A Socket Library 871
BasicSocket 872
Socket 874
IPSocket 878
TCPSocket 879
SOCKSSocket 880
TCPServer 881
UDPSocket 882
UNIXSocket 884
UNIXServer 885
B Support 887
Websites 887
Usenet Newsgroup 888
Mailing Lists 888
Bug Reporting 889
C Bibliography 891
List of Tables
2.1 Example Variable and Class Names 19
7.1 Character Class Abbreviations 107
7.2 Posix Character Classes 107
7.3 Unicode Character Properties 108
9.1 Common Comparison Operators 139
14.1 Debugger Commands 216
15.1 Environment Variables Used by Ruby 224
15.2 Version Operators 232
18.1 irb Command-Line Options 266
20.1 Command-Line Options for erb 299
22.1 General Delimited Input 315
22.2 Substitutions in Double-Quoted Strings 317
22.3 Reserved Words 323
22.4 Ruby Operators (High to Low Precedence) 333
24.1 Ruby Hook Methods 400
26.1 Definition of the Safe Levels 429
27.1 Class Array: pack directives 447
27.2 Encoding Names and Class Names 475
27.3 Class File: Match-Mode Constants 501
27.4 Class File: Path Separators 503
27.5 Class File: Open-Mode Constants 505
27.6 Class File: Lock-Mode Constants 509
27.7 Class 10: Mode Strings 538
27.8 Module Kernel: Options to Spawn and System 571
27.9 Module Kernel: sprintf Flag Characters 572
27.10 Module Kernel: sprintf Field Types 572
27.11 Module Kernel: File Tests with a Single Argument 573
27.12 Module Kernel: File Tests with Two Arguments 573
27.13 Class Numeric: Methods and Subclasses 609
27.14 Class Numeric: divmod, modulo, and remainder 610
27.15 Class String: Options to Encode 671
27.16 Class String: Backslash Sequences in Substitution Strings 673
27.17 Class String: unpack Directives 685
27.18 Class Time: strftime Directives 711
28.1 Class ERB: Inline Directives 741
28.2 Class OptionParser: Option Definitions 777
29.1 C/Ruby Data Type Conversion Functions and Macros 830
29.2 Object Accessor Macros 833
List of Figures
3.1 Variables Hold Object References 45
4.1 How Arrays Are Indexed 49
10.1 Ruby Exception Hierarchy 153
13.1 Testing Framework Assertions 203
13.2 Additional Test::Unit Assertions 204
14.1 Sample irb Session 208
14.2 Determining Method Calling Costs Using Benchmark 213
15.1 Installed Documentation for Builder 228
17.1 Encodings and Their Aliases 253
19.1 Browse RDoc Output for Class Counter 278
19.2 Browse RDoc Output When Source Has Comments 279
19.3 Using ri to Read Documentation 280
19.4 Documentation for Class Proc Generated by RDoc/ri 281
19.5 Ruby Source File Documented with RDoc 289
19.6 C Source File Documented with RDoc 290
20.1 Sample CGI Form 294
22.1 State Transitions for Boolean Range 336
24.1 Object Model for a Basic Class 376
24.2 Object Model for a Singleton Class 378
24.3 Basic Class Definition 380
24.4 Class with So-Called Class Methods 381
24.5 How Modules Are Included 385
27.1 Standard Exception Hierarchy 493
27.2 Method#arity in Action 583
29.1 Wrapping Objects Around C Data Types 838
29.2 Building an Extension 848
|
any_adam_object | 1 |
author | Thomas, David Fowler, Chad Hunt, Andrew 1964- |
author_GND | (DE-588)139216308 (DE-588)133675025 |
author_facet | Thomas, David Fowler, Chad Hunt, Andrew 1964- |
author_role | aut aut aut |
author_sort | Thomas, David |
author_variant | d t dt c f cf a h ah |
building | Verbundindex |
bvnumber | BV035943763 |
classification_rvk | ST 250 |
ctrlnum | (OCoLC)604912831 (DE-599)BSZ302476911 |
dewey-full | 005.133 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.133 |
dewey-search | 005.133 |
dewey-sort | 15.133 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01631nam a22004212c 4500</leader><controlfield tag="001">BV035943763</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20100413 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">100108s2009 a||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781934356081</subfield><subfield code="9">978-1-934356-08-1</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1934356085</subfield><subfield code="9">1-934356-08-5</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)604912831</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BSZ302476911</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-83</subfield><subfield code="a">DE-92</subfield></datafield><datafield tag="080" ind1=" " ind2=" "><subfield code="a">004.43</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.133</subfield><subfield code="2">22</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Thomas, David</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Programming Ruby 1.9</subfield><subfield code="b">the pragmatic programmers' guide</subfield><subfield code="c">Dave Thomas with Chad Fowler and Andy Hunt</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Raleigh, NC [u.a.]</subfield><subfield code="b">The Pragmatic Bookshelf</subfield><subfield code="c">2009</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXVIII, 930 S.</subfield><subfield code="b">Ill.</subfield><subfield code="c">23 cm</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">The facets of ruby series</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">The pragmatic programmers</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Previous ed.: 2005</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Ruby (Computer program language)</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Ruby</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4653817-3</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Ruby</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4653817-3</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Fowler, Chad</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)139216308</subfield><subfield code="4">aut</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Hunt, Andrew</subfield><subfield code="d">1964-</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)133675025</subfield><subfield code="4">aut</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HBZ Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018800953&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-018800953</subfield></datafield></record></collection> |
id | DE-604.BV035943763 |
illustrated | Illustrated |
indexdate | 2024-07-09T22:07:50Z |
institution | BVB |
isbn | 9781934356081 1934356085 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-018800953 |
oclc_num | 604912831 |
open_access_boolean | |
owner | DE-83 DE-92 |
owner_facet | DE-83 DE-92 |
physical | XXVIII, 930 S. Ill. 23 cm |
publishDate | 2009 |
publishDateSearch | 2009 |
publishDateSort | 2009 |
publisher | The Pragmatic Bookshelf |
record_format | marc |
series2 | The facets of ruby series The pragmatic programmers |
spelling | Thomas, David Verfasser aut Programming Ruby 1.9 the pragmatic programmers' guide Dave Thomas with Chad Fowler and Andy Hunt Raleigh, NC [u.a.] The Pragmatic Bookshelf 2009 XXVIII, 930 S. Ill. 23 cm txt rdacontent n rdamedia nc rdacarrier The facets of ruby series The pragmatic programmers Previous ed.: 2005 Ruby (Computer program language) Ruby Programmiersprache (DE-588)4653817-3 gnd rswk-swf Ruby Programmiersprache (DE-588)4653817-3 s DE-604 Fowler, Chad Verfasser (DE-588)139216308 aut Hunt, Andrew 1964- Verfasser (DE-588)133675025 aut HBZ Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018800953&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Thomas, David Fowler, Chad Hunt, Andrew 1964- Programming Ruby 1.9 the pragmatic programmers' guide Ruby (Computer program language) Ruby Programmiersprache (DE-588)4653817-3 gnd |
subject_GND | (DE-588)4653817-3 |
title | Programming Ruby 1.9 the pragmatic programmers' guide |
title_auth | Programming Ruby 1.9 the pragmatic programmers' guide |
title_exact_search | Programming Ruby 1.9 the pragmatic programmers' guide |
title_full | Programming Ruby 1.9 the pragmatic programmers' guide Dave Thomas with Chad Fowler and Andy Hunt |
title_fullStr | Programming Ruby 1.9 the pragmatic programmers' guide Dave Thomas with Chad Fowler and Andy Hunt |
title_full_unstemmed | Programming Ruby 1.9 the pragmatic programmers' guide Dave Thomas with Chad Fowler and Andy Hunt |
title_short | Programming Ruby 1.9 |
title_sort | programming ruby 1 9 the pragmatic programmers guide |
title_sub | the pragmatic programmers' guide |
topic | Ruby (Computer program language) Ruby Programmiersprache (DE-588)4653817-3 gnd |
topic_facet | Ruby (Computer program language) Ruby Programmiersprache |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018800953&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT thomasdavid programmingruby19thepragmaticprogrammersguide AT fowlerchad programmingruby19thepragmaticprogrammersguide AT huntandrew programmingruby19thepragmaticprogrammersguide |