BT

Ruby Metaprogramming Techniques

by Peter Cooper on Sep 27, 2006 |

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.

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.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

Discuss

Educational Content

Personalize Your Main Interests




    Development
    Architecture & Design
    Process & Practices
    Operations & Infrastructure
    Enterprise Architecture

This affects what content you see on the homepage & your RSS feed. Click preferences to access more fine-grained personalization.

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2015 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT