Module design acceptable practices questions…
-
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?
-
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…
- 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).
- 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