You are here |
dejimata.com | ||
| | | |
yehudakatz.com
|
|
| | | | After writing my last post on Rails plugin idioms, I realized that Ruby metaprogramming, at its core, is actually quite simple. It comes down to the fact that all Ruby code is executed code--there is no separate compile or runtime phase. In Ruby, every line of code is executed against | |
| | | |
blog.jayfields.com
|
|
| | | | Module.include(module, ..) is commonly used to mix modules into classes and other modules. When a module is included the constants, methods... | |
| | | |
konradreiche.com
|
|
| | | | Ruby on Rails applications are modelled around active record yet what if your application is based on a domain which needs to be provided in a programmatic way? In other words, your application, controller and views stand on a fixed set of Ruby classes yielding the context. In a manual fashion one would implement this by creating controller and views for each specific class. Assuming that the classes of this domain share the same interface this approach would introduce a lot of redundancy. With meta-programming this amount can be cut down. | |
| | | |
emmettnaughton.com
|
|
| |