On 8/20/06, Daniel Waite <rabbitblue / gmail.com> wrote:
> Hi all. I've got a design question.
>
> Imagine you have a module, CreditCardProcessor. Inside
> CreditCardProcessor is another module called AuthorizeNet.
> CreditCardProcessor acts as an interface that AuthorizeNet must
> implement. (This is, from what I understand, a reasonably accurate
> implementation of the Strategy pattern (behavioral implementation behind
> a common interface). However, if you feel I could be more accurate,
> don't hesitate to say so. :)
>
> Now imagine we have a class named Acme that extends class Company.
> Company includes CreditCardProcessor and has an instance variable called
> @credit_card_processor.

I would probably not put CreditCardProcessor inside Company.  I would
leave it as a stand alone module and call it when needed.