Re: Are my metaprogramming underpants showing?

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.
#####################################################################################

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.