Term meaning "Class or Module"

I

Intransition

Anyone have a term, for an attribute name, meaning "Class or Module".
I probably would just use #class but that's a keyword so that's out.
So far I've tried #scope and #namespace, but neither seem quite right.
Any suggestions?
 
J

Jacob Mitchell

[Note: parts of this message were removed to make it a legal post.]

People sometimes use "klass". As for module, I haven't ever found a need
for that, but perhaps "component" would be good.
 
C

Chris Mear

Anyone have a term, for an attribute name, meaning "Class or Module".
I probably would just use #class but that's a keyword so that's out.
So far I've tried #scope and #namespace, but neither seem quite right.
Any suggestions?

I've seen the deliberate mispelling #klass used before.

Chris
 
J

Jesús Gabriel y Galán

Anyone have a term, for an attribute name, meaning "Class or Module".
I probably would just use #class but that's a keyword so that's out.
So far I've tried #scope and #namespace, but neither seem quite right.
Any suggestions?

class_or_module ?

Jesus.
 
C

Caleb Clausen

Anyone have a term, for an attribute name, meaning "Class or Module".
I probably would just use #class but that's a keyword so that's out.
So far I've tried #scope and #namespace, but neither seem quite right.
Any suggestions?

#class is a perfectly fine name for a method. So is #module. Ruby is,
as you nknow very forgiving about letting you use keywords for method
names. Unless this method is going to be called without a receiver
(inside the class where you define it) a lot, there will be no
awkwardness about calling it.
 
X

Xavier Noria

#class is a perfectly fine name for a method. So is #module. Ruby is,
as you nknow very forgiving about letting you use keywords for method
names. Unless this method is going to be called without a receiver
(inside the class where you define it) a lot, there will be no
awkwardness about calling it.

That's correct but it would override Object#class though, probably not
a good idea.
 
A

Andrew Wagner

[Note: parts of this message were removed to make it a legal post.]

I would tend to call it a module, since a class is_a module, and I'm
guessing it's probably the only subclass of module.
 
B

Benoit Daloze

I would tend to call it a module, since a class is_a module, and I'm
guessing it's probably the only subclass of module.

Agreed.
And for the name, I already met some 'mod' (if 'module' can not work),
which is better than 'klass' to my eyes.
(Wrong spelling just hurts)

B.D.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top