Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Metaprogramming Ruby 2
For the Best Reading Experience...
Table of Contents
What Readers Are Saying About Metaprogramming Ruby 2
Foreword
Acknowledgments
Introduction
About This Book
About You
Part 1: Metaprogramming Ruby
Chapter 1: The M Word
Ghost Towns and Marketplaces
The Story of Bob, Metaprogrammer
Metaprogramming and Ruby
Chapter 2: Monday: The Object Model
Open Classes
Inside the Object Model
Quiz: Missing Lines
What Happens When You Call a Method?
Quiz: Tangle of Modules
Wrap-Up
Chapter 3: Tuesday: Methods
A Duplication Problem
Dynamic Methods
method_missing
Quiz: Bug Hunt
Blank Slates
Wrap-Up
Chapter 4: Wednesday: Blocks
The Day of the Blocks
Quiz: Ruby#
Blocks Are Closures
instance_eval()
Callable Objects
Writing a Domain-Specific Language
Quiz: A Better DSL
Wrap-Up
Chapter 5: Thursday: Class Definitions
Class Definitions Demystified
Quiz: Class Taboo
Singleton Methods
Singleton Classes
Quiz: Module Trouble
Method Wrappers
Quiz: Broken Math
Wrap-Up
Chapter 6: Friday: Code That Writes Code
Coding Your Way to the Weekend
Kernel#eval
Quiz: Checked Attributes (Step 1)
Quiz: Checked Attributes (Step 2)
Quiz: Checked Attributes (Step 3)
Quiz: Checked Attributes (Step 4)
Hook Methods
Quiz: Checked Attributes (Step 5)
Wrap-Up
Chapter 7: Epilogue
Part 2: Metaprogramming in Rails
Chapter 8: Preparing for a Rails Tour
Ruby on Rails
Installing Rails
The Rails Source Code
Chapter 9: The Design of Active Record
A Short Active Record Example
How Active Record Is Put Together
A Lesson Learned
Chapter 10: Active Support’s Concern Module
Rails Before Concern
ActiveSupport::Concern
A Lesson Learned
Chapter 11: The Rise and Fall of alias_method_chain
The Rise of alias_method_chain
The Fall of alias_method_chain
A Lesson Learned
Chapter 12: The Evolution of Attribute Methods
Attribute Methods in Action
A History of Complexity
A Lesson Learned
Chapter 13: One Final Lesson
Metaprogramming Is Just Programming
Part 3: Appendixes
Appendix 1: Common Idioms
Mimic Methods
Nil Guards
Self Yield
Symbol#to_proc()
Appendix 2: Domain-Specific Languages
The Case for Domain-Specific Languages
Internal and External DSLs
DSLs and Metaprogramming
Appendix 3: Spell Book
The Spells
You May Be Interested In…
← Prev
Back
Next →
← Prev
Back
Next →