# Shouldn't it be self \>\> class, or am I dyslexic?

**URL:** <https://rubytalk.org/t/shouldnt-it-be-self-class-or-am-i-dyslexic/40303>\
**Category:** ruby-talk\
**Created:** [1 September 2007 01:02 UTC](https://rubytalk.org/t/shouldnt-it-be-self-class-or-am-i-dyslexic/40303 "2007-09-01T01:02:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Tompkins](https://avatars.discourse-cdn.com/v4/letter/b/7c8e57/32.png) [@Ben\_Tompkins](https://rubytalk.org/u/Ben_Tompkins)\
**Post date:** [1 September 2007 01:02 UTC](https://rubytalk.org/t/shouldnt-it-be-self-class-or-am-i-dyslexic/40303/1 "2007-09-01T01:02:57Z")

</div>

The semantics of

class X

...

class \<\< self  
&nbsp;&nbsp;def instance\_method\_for\_class\_object\_named\_X  
&nbsp;&nbsp;&nbsp;&nbsp;...  
&nbsp;&nbsp;end  
end

end

is that an instance method is added (appended) to the current object X  
== self by  
the class definition that encloses the new method. Because we are  
appending a new method to self, the arrows should point towards "self"  
not "class."

nbits

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Ben\_Tompkins](https://avatars.discourse-cdn.com/v4/letter/b/7c8e57/32.png) [@Ben\_Tompkins](https://rubytalk.org/u/Ben_Tompkins)\
**Post date:** [1 September 2007 01:14 UTC](https://rubytalk.org/t/shouldnt-it-be-self-class-or-am-i-dyslexic/40303/2 "2007-09-01T01:14:55Z")

</div>

Oops,

Subject should read "... class \>\> self ..."

(Ok, maybe I am dyslexic -- but I'm still right -- just takes me a  
couple  
of tries to get the sequencing right.) 🙂

Ben Tompkins wrote:

> **···**
>
> > The semantics of
> > 
> > class X
> > 
> > ...
> > 
> > class \<\< self // I think it should be class \>\> self.  
> > &nbsp;&nbsp;def instance\_method\_for\_class\_object\_named\_X  
> > &nbsp;&nbsp;&nbsp;&nbsp;...  
> > &nbsp;&nbsp;end  
> > end
> > 
> > end
> > 
> > is that an instance method is added (appended) to the current object X  
> > == self by  
> > the class definition that encloses the new method. Because we are  
> > appending a new method to self, the arrows should point towards "self"  
> > not "class."
> > 
> > nbits
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
