Module design acceptable practices questions..

G

Gene Angelo

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?
 
R

Robert Klemme

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,825
Members
47,371
Latest member
Brkaa

Latest Threads

Top