Книга: Metaprogramming Ruby 2
Назад: DSLs and Metaprogramming
Дальше: The Spells

Appendix 3

Spell Book

Whenever someone says they have “a cool trick,” take them outside and slap them up.

Jim Weirich (1956--2014)

This appendix is a “spell book”—a quick reference to all the “spells” in the book, in alphabetical order. Most of these spells are metaprogramming related (but the ones from Appendix 1, , are arguably not that “meta”). Each spell comes with a short example and a reference to the page where it’s introduced. Go to the associated pages for extended examples and the reasoning behind each spell.

Назад: DSLs and Metaprogramming
Дальше: The Spells