Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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