结语
优质
小牛编辑
135浏览
2023-12-01
Ruby元编程应用远不止如此,Rails里就大量涉及了这种技术。你可以仔细研读Rails的代码。
参考资料
- An Exercise in Metaprogramming with Ruby.
- Metaprogramming Ruby - Author: Paolo Perrotta.
- Metaprogramming in Ruby: It’s All About the Self.
- Programming Ruby 1.9 - Author: Dave Thomas.
- Seeing Metaclasses Clearly.
- The Book Of Ruby - Author: Huw Collingbourne.
- The Ruby Object Model and Metaprogramming screencasts with Dave Thomas.
- Understanding Ruby Singleton Classes.