|
You are here |
suchdevblog.com | ||
| | | | |
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... | |
| | | | |
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)... | |
| | | | |
pbrisbin.com
|
|
| | | | | Ruby's open classes are great for adding behavior to existing objects. Though it's a language feature, there to be used, I'd argue that the majority of times it is used, Open classes weren't the most appropriate tool. First of all, you may be setting yourself (and other developers) up for confusion. Not knowing where methods come from or why a method behaves oddly can be a problem. In the majority of cases, I find you've got an instance of some object, and you just want to add behavior to it. | |
| | | | |
weblog.raganwald.com
|
|
| | | |||