# Re: Are my metaprogramming underpants showing?

**URL:** <https://www.ruby-forum.com/t/re-are-my-metaprogramming-underpants-showing/49812>\
**Category:** Ruby\
**Created:** [December 8, 2005, 10:06pm UTC](https://www.ruby-forum.com/t/re-are-my-metaprogramming-underpants-showing/49812 "2005-12-08T22:06:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@daniels](https://www.ruby-forum.com/u/daniels)\
**Post date:** [December 8, 2005, 10:06pm UTC](https://www.ruby-forum.com/t/re-are-my-metaprogramming-underpants-showing/49812/1 "2005-12-08T22:06:52Z")

</div>

> Given that the code below is functionally equivalent, what’s  
> beneficial about using a lambda expression? It strikes me as a  
> requirement imposed by using the Functor class more than anything.

The class way is definitely the way to go, as it gives you easier  
flexibility. I was just in a lamdba mood at the time I wrote it and  
couldn’t be bothered making it into a class.

You might want to do this:

class Flickr  
instance\_methods.each {|x| remove\_method(x) unless / **.\*** / === x }  
end

To prevent any conflict between flickr methods and ruby object methods.

#####################################################################################  
This email has been scanned by MailMarshal, an email content filter.  
#####################################################################################

---

<div class="post-metadata">

**Author:** ![daniels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@daniels](https://www.ruby-forum.com/u/daniels)\
**Post date:** [December 9, 2005, 1:18am UTC](https://www.ruby-forum.com/t/re-are-my-metaprogramming-underpants-showing/49812/2 "2005-12-09T01:18:48Z")

</div>

On Dec 8, 2005, at 21:05, Daniel S. wrote:

> class Flickr  
> instance\_methods.each {|x| remove\_method(x) unless / **.\*** / === x }  
> end
> 
> To prevent any conflict between flickr methods and ruby object  
> methods.

Good idea, since a conflict would break the whole thing.

Thanks again to you and Trans for the feedback.

matthew smillie.
