0

Is there a specific name to this? For me it looks like a view router, or a presenter router (I would name it like that) but maybe there is a better name and explication.

1

You might get away with calling this a strategy pattern or a collection of template methods.

But don't try too hard to assign names to how ruby is used. In ruby you can add and modify classes and individual objects, throw around code blocks etc., with such ease that the standard design patterns seem less pertinent after a while.

  • If it doesn't have a specific name, then I'll stick with Strategy. If we take Strategy and Bridge, they are actually the same pattern, except that a Strategy objectifies an algorithm, a behaviour, while Bridge is for specifying object structure. Maybe this thing will get a name if it gets more popular. I think that it doesn't depend much on what tools the programming language provides. The design patterns seem more about a concept than of the actual implementation. So if you implement the Strategy pattern with modules or Roles with extending objects, it is still going to be the given pattern – FreeCandies Nov 13 '12 at 2:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.