Module design acceptable practices questions

Module design acceptable practices questions…

  1. Is it “accepted” practice to prohibit a particular module from being
    extended or included? Or should a module, “normally” be able to be
    included and extended?

  2. Is it an “accepted” practice to both include AND extend a module in a
    given class?

On Wed, Sep 29, 2010 at 8:56 PM, Gene A. [email protected] wrote:

Module design acceptable practices questions…

  1. Is it “accepted” practice to prohibit a particular module from being
    extended or included? Or should a module, “normally” be able to be
    included and extended?

I cannot recall having seen a module implementer attempt this. If at
all I guess it is a rather rare practice to try to do this and frankly
I believe this does not fit very well to Ruby’s otherwise rather
relaxed approach (e.g. you can get around private methods rather
easily).

  1. Is it an “accepted” practice to both include AND extend a module in a
    given class?

I would only do one or the other but I might have seen other examples.

Kind regards

robert

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs