Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Ruby Metaprogramming Techniques

Ruby Metaprogramming Techniques


Ola Bini, a developer from Stockholm, has rapidly become one of the more prolific Ruby bloggers of late. One of his latest articles looks at Ruby Metaprogramming techniques:

I have been thinking much about Metaprogramming lately. I have come to the conclusion that I would like to see more examples and explanations of these techniques.

Ola looks at singleton classes, Domain Specific Languages, dynamic class generation, using method_missing, method dispatching using patterns, method replacement, null object refactoring, eval, instance variable introspection, procs and blocks, and eval bindings. It's quite a trip and Ola touches on enough topics and gives so many great code examples that no Ruby programmer could fail to pick up a useful tip from this.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p