From: Jam Date: 2012-08-24T12:54:08+09:00 Subject: Re: Would you merge repeating code even when it's get more complex? Uncle Bob commands: extract methods till you drop. Extract your repeated code until there isn't any. Now, I try not to be religious about this, but I can't think of any examples where having repeated code has been anything other than a maintenance problem. If this is personal code, do whatever. If it's for a company , Bob Martin's advice is well worth considering. On Aug 23, 2012, at 9:34 PM, "Martin J." wrote: > Hi, I wrote a module including some instance and class methods with are > very similar. That means some lines do exactly the same once for > instance and once for class methods. I started to refactor theses > methods but the code got quite complex as a result. > > Please take a look at this module: > https://github.com/mjio/uberhook/blob/master/lib/uberhook/base.rb#L43 > > Would you merge these methods to remove the repeating code even when the > code gets more complex and harder to read? > > -- > Posted via http://www.ruby-forum.com/. >