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?

···

--
Posted via http://www.ruby-forum.com/.

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).

2) 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

···

On Wed, Sep 29, 2010 at 8:56 PM, Gene Angelo <web.gma@gmail.com> wrote:

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/