|
You are here |
dejimata.com | ||
| | | | |
thepugautomatic.com
|
|
| | | | | I recently discovered the Ruby Module Builder pattern. It lets you pass in arguments to dynamically generate a module at include time: class Greeter < Module def initialize(name)... | |
| | | | |
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 | |
| | | | |
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. | |
| | | | |
gist.github.com
|
|
| | | GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects. | ||