From: Paul Mckibbin Date: 2008-03-11T10:11:46+09:00 Subject: Re: Which is better -- method option or multiple methods? > It's not. It's why it was used as an argument for the case where you'd > prefer to make this function public (assuming we speak of > align(direction, *args)): the "dynamic" one. > > Was my post so confusing? Not confusing. I can see some cases where the decision making process would be embedded and the method call deferred, but by the same token, the decision process could be: direction=case when :left when :right etc.... which was what I was referring to. I'm sure that we can come up with example and counter example all night. :) >> send("align_#{direction}",spacing) > > Of course you can. But I won't: I don't find this coding-style very > maintainable or easy to read. It's a matter of taste, I only presented > mine... That was an artificial example, which I don't think I've ever coded sober. If I found myself in the "real" situation where I was forced to do this more than once, I'd consider making both mechanisms public and calling align(direction,spacing) too. It's all a matter of working out what you need and refactoring accordingly. Mac -- Posted via http://www.ruby-forum.com/.