# Term meaning "Class or Module"

**URL:** <https://www.ruby-forum.com/t/term-meaning-class-or-module/192881>\
**Category:** Ruby\
**Created:** [August 7, 2010, 3:54pm UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881 "2010-08-07T15:54:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [August 7, 2010, 3:54pm UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881/1 "2010-08-07T15:54:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [August 7, 2010, 4:25pm UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881/2 "2010-08-07T16:25:24Z")

</div>

People sometimes use “klass”. As for module, I haven’t ever found a  
need  
for that, but perhaps “component” would be good.

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [August 7, 2010, 4:31pm UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881/3 "2010-08-07T16:31:50Z")

</div>

On 2010-08-07 14:51:16 +0100, Intransition said:

> 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

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [August 7, 2010, 11:55pm UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881/4 "2010-08-07T23:55:32Z")

</div>

On 8/7/10, Intransition [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [August 7, 2010, 11:35pm UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881/5 "2010-08-07T23:35:03Z")

</div>

On Sat, Aug 7, 2010 at 3:51 PM, Intransition [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

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

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [August 8, 2010, 1:36am UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881/6 "2010-08-08T01:36:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [August 8, 2010, 12:40am UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881/7 "2010-08-08T00:40:36Z")

</div>

On Sat, Aug 7, 2010 at 11:54 PM, Caleb C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

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

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [August 8, 2010, 1:46am UTC](https://www.ruby-forum.com/t/term-meaning-class-or-module/192881/8 "2010-08-08T01:46:10Z")

</div>

On 8 August 2010 01:36, Andrew W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Sat, Aug 7, 2010 at 9:51 AM, Intransition [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > 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 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.
