Metaprogramming Ruby: program like the Ruby pros
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Raleigh, NC [u.a.]
Pragmatic Bookshelf
2010
|
Schriftenreihe: | The pragmatic programmers
The facets of Ruby series |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XXIX, 261 S. Ill., graph. Darst. |
ISBN: | 9781934356470 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV025608508 | ||
003 | DE-604 | ||
005 | 20100727 | ||
007 | t | ||
008 | 100417s2010 ad|| |||| 00||| eng d | ||
020 | |a 9781934356470 |9 978-1-934356-47-0 | ||
035 | |a (OCoLC)699494872 | ||
035 | |a (DE-599)BVBBV025608508 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-11 |a DE-83 | ||
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
100 | 1 | |a Perrotta, Paolo |e Verfasser |4 aut | |
245 | 1 | 0 | |a Metaprogramming Ruby |b program like the Ruby pros |c by Paolo Perrotta |
264 | 1 | |a Raleigh, NC [u.a.] |b Pragmatic Bookshelf |c 2010 | |
300 | |a XXIX, 261 S. |b Ill., graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a The pragmatic programmers | |
490 | 0 | |a The facets of Ruby series | |
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 | |
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=020203464&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-020203464 |
Datensatz im Suchindex
_version_ | 1804142793459761152 |
---|---|
adam_text | Titel: Metaprogramming Ruby
Autor: Perrotta, Paolo
Jahr: 2010
Foreword.............. xi
Acknowledgments........... xiii
Introduction............. xv
Part I — Metaprogramming Ruby
1. Monday: The Object Model......... 3
1.1 Monday with Bill 3
1.2 Open Classes 4
1.3 The Truth About Classes 9
1.4 Quiz: Missing Lines 19
1.5 What Happens When You Call a Method? 20
1.6 Quiz: Tangle of Modules 29
1.7 Object Model Wrap-Up 32
2. Tuesday: Methods........... 33
2.1 A Duplication Problem 34
2.2 Dynamic Methods 36
2.3 method_missingO 43
2.4 Quiz: Bug Hunt 53
2.5 More method_missingO 55
3. Wednesday: Blocks........... 61
3.1 How to Handle Hump Day 62
3.2 Quiz: Ruby# 63
3.3 Closures 65
3.4 instance_eval() 74
3.5 Callable Objects 76
3.6 Writing a Domain-Specific Language 84
3.7 Quiz: A Better DSL 86
vüi • Contents
4. Thursday: Class Definitions......... 91
4.1 Class Définitions Demystified 91
4.2 Quiz: Class Taboo 98
4.3 Singleton Methods 100
4.4 Eigenclasses 105
4.5 Quiz: Module Trouble 116
4.6 Aliases 118
4.7 Quiz: Broken Math 123
5. Friday: Code That Writes Code........ I25
5.1 Leading the Way 125
5.2 Kernel#eval 127
5.3 Quiz: Checked Attributes (Step 1} 137
5.4 Quiz: Checked Attributes (Step 2) 139
5.5 Quiz: Checked Attributes (Step 3) 141
5.6 Quiz: Checked Attributes (Step 4) 142
5.7 Hook Methods 144
5.8 Quiz: Checked Attributes (Step 5) 148
6. Epilogue............. 151
Part II — Metaprogramming in Rails
7. The Design of ActiveRecord........ 155
7.1 Preparing for the Tour 156
7.2 The Design of ActiveRecord 158
7.3 Lessons Learned 166
8. Inside ActiveRecord.......... 171
8.1 Dynamic Attributes 171
8.2 Dynamic Finders 179
8.3 Lessons Learned 184
9. Metaprogramming Safely......... 189
9.1 Testing Metaprogramming 189
9.2 Defusing Monkeypatches 196
9.3 Lessons Learned 202
Contents • ix
Part III — Appendixes
Al. Common Idioms........... 207
Al.l Mimic Methods 207
A1.2 Nil Guards 209
Al .3 Tricks with Method Arguments 211
A1.4 SelfYield 214
A1.5 Symbol#to_proc() 216
A2. Domain-Specific Languages........ 219
A2.1 The Case for Domain-Specific Languages 219
A2.2 Internal and External DSLs 221
A2.3 DSLs and Metaprogramming 222
A3. Spell Book............. 223
A3.1 The Spells 223
Bibliography............ 235
Index.............. 237
|
any_adam_object | 1 |
author | Perrotta, Paolo |
author_facet | Perrotta, Paolo |
author_role | aut |
author_sort | Perrotta, Paolo |
author_variant | p p pp |
building | Verbundindex |
bvnumber | BV025608508 |
classification_rvk | ST 250 |
ctrlnum | (OCoLC)699494872 (DE-599)BVBBV025608508 |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01301nam a2200337 c 4500</leader><controlfield tag="001">BV025608508</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20100727 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">100417s2010 ad|| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781934356470</subfield><subfield code="9">978-1-934356-47-0</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)699494872</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV025608508</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-11</subfield><subfield code="a">DE-83</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">Perrotta, Paolo</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Metaprogramming Ruby</subfield><subfield code="b">program like the Ruby pros</subfield><subfield code="c">by Paolo Perrotta</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Raleigh, NC [u.a.]</subfield><subfield code="b">Pragmatic Bookshelf</subfield><subfield code="c">2010</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXIX, 261 S.</subfield><subfield code="b">Ill., graph. Darst.</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 pragmatic programmers</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">The facets of Ruby series</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="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=020203464&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-020203464</subfield></datafield></record></collection> |
id | DE-604.BV025608508 |
illustrated | Illustrated |
indexdate | 2024-07-09T22:37:25Z |
institution | BVB |
isbn | 9781934356470 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-020203464 |
oclc_num | 699494872 |
open_access_boolean | |
owner | DE-11 DE-83 |
owner_facet | DE-11 DE-83 |
physical | XXIX, 261 S. Ill., graph. Darst. |
publishDate | 2010 |
publishDateSearch | 2010 |
publishDateSort | 2010 |
publisher | Pragmatic Bookshelf |
record_format | marc |
series2 | The pragmatic programmers The facets of Ruby series |
spelling | Perrotta, Paolo Verfasser aut Metaprogramming Ruby program like the Ruby pros by Paolo Perrotta Raleigh, NC [u.a.] Pragmatic Bookshelf 2010 XXIX, 261 S. Ill., graph. Darst. txt rdacontent n rdamedia nc rdacarrier The pragmatic programmers The facets of Ruby series Ruby Programmiersprache (DE-588)4653817-3 gnd rswk-swf Ruby Programmiersprache (DE-588)4653817-3 s DE-604 HBZ Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=020203464&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Perrotta, Paolo Metaprogramming Ruby program like the Ruby pros Ruby Programmiersprache (DE-588)4653817-3 gnd |
subject_GND | (DE-588)4653817-3 |
title | Metaprogramming Ruby program like the Ruby pros |
title_auth | Metaprogramming Ruby program like the Ruby pros |
title_exact_search | Metaprogramming Ruby program like the Ruby pros |
title_full | Metaprogramming Ruby program like the Ruby pros by Paolo Perrotta |
title_fullStr | Metaprogramming Ruby program like the Ruby pros by Paolo Perrotta |
title_full_unstemmed | Metaprogramming Ruby program like the Ruby pros by Paolo Perrotta |
title_short | Metaprogramming Ruby |
title_sort | metaprogramming ruby program like the ruby pros |
title_sub | program like the Ruby pros |
topic | Ruby Programmiersprache (DE-588)4653817-3 gnd |
topic_facet | Ruby Programmiersprache |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=020203464&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT perrottapaolo metaprogrammingrubyprogramliketherubypros |