# Interesting snippets on dynamic method definitions in Ruby

**URL:** <https://www.ruby-forum.com/t/interesting-snippets-on-dynamic-method-definitions-in-ruby/70348>\
**Category:** Ruby\
**Created:** [September 28, 2006, 3:17pm UTC](https://www.ruby-forum.com/t/interesting-snippets-on-dynamic-method-definitions-in-ruby/70348 "2006-09-28T15:17:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjmadsen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Post date:** [September 28, 2006, 3:17pm UTC](https://www.ruby-forum.com/t/interesting-snippets-on-dynamic-method-definitions-in-ruby/70348/1 "2006-09-28T15:17:36Z")

</div>

Hi,

I’m new to the list - I hope this posting is welcome. I’ve been (like  
everyone?) learning and enjoying Ruby’s intricacies. One of those  
intricacies is explained briefly in the Dave T.’ Pickaxe book:  
dynamic methods. The code was from Tadayoshi F. (p. 391 in version  
2).

I thought this code was interesting but also quite dense and hard to  
understand. I decided to try to write a more readable version, to help  
me understand the functions. I didn’t re-implement all of the original  
functionality but I came pretty close.

Rather than clog the digest readers’ mail with lots of code, I’ve posted  
an article detailing what I did on my website. If there’s a better place  
to put sample code, or if I should have posted all code/commentary in  
this message, just let me know and in the future I’ll do that. I’ll look  
forward to learning a lot and hopefully contributing on this list!

I hope this article is useful to others:

[http://www.misuse.org/cms/article.php?story=20060928053416140](http://www.misuse.org/cms/article.php?story=20060928053416140)

Sincerely,

Steve
