<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to access a class method from an instance</title>
	<atom:link href="http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/</link>
	<description>Because programming should be fun</description>
	<lastBuildDate>Wed, 04 Jan 2012 05:17:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Emanuel Williams</title>
		<link>http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/comment-page-1/#comment-810</link>
		<dc:creator>Emanuel Williams</dc:creator>
		<pubDate>Fri, 09 Jan 2009 17:07:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/#comment-810</guid>
		<description>hi
6pmw62rr3txncph6
good luck</description>
		<content:encoded><![CDATA[<p>hi<br />
6pmw62rr3txncph6<br />
good luck</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/comment-page-1/#comment-147</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Wed, 18 Apr 2007 16:42:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/#comment-147</guid>
		<description>You are bringing up a good point. It&#039;s true that if you change your class name, you could have some tedious search and replace operations to do depending on the size of your class. But personally it&#039;s a price I&#039;m willing to pay. To me it&#039;s more a matter of clarity than anything else. The fact that you can have the word &quot;self&quot; pointing to different things inside the same class (sometimes to an instance, sometimes to the class itself) just doesn&#039;t please me that much. However, I have to agree that this practice is more convenient in some situations.

Thanks for your comment</description>
		<content:encoded><![CDATA[<p>You are bringing up a good point. It&#8217;s true that if you change your class name, you could have some tedious search and replace operations to do depending on the size of your class. But personally it&#8217;s a price I&#8217;m willing to pay. To me it&#8217;s more a matter of clarity than anything else. The fact that you can have the word &#8220;self&#8221; pointing to different things inside the same class (sometimes to an instance, sometimes to the class itself) just doesn&#8217;t please me that much. However, I have to agree that this practice is more convenient in some situations.</p>
<p>Thanks for your comment</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manveru</title>
		<link>http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/comment-page-1/#comment-139</link>
		<dc:creator>manveru</dc:creator>
		<pubDate>Wed, 18 Apr 2007 09:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/#comment-139</guid>
		<description>I certainly don&#039;t mind if you do this in your code, but i suggest you use

def self.laughs

and also think about how many you have to change when you suddenly decide that Monkey should be called Primate... using self in these cases can save you some typing ;)

see following post which is loosly related:
http://www.oreillynet.com/ruby/blog/2007/04/nubygems_be_kind_to_your_child.html</description>
		<content:encoded><![CDATA[<p>I certainly don&#8217;t mind if you do this in your code, but i suggest you use</p>
<p>def self.laughs</p>
<p>and also think about how many you have to change when you suddenly decide that Monkey should be called Primate&#8230; using self in these cases can save you some typing ;)</p>
<p>see following post which is loosly related:<br />
<a href="http://www.oreillynet.com/ruby/blog/2007/04/nubygems_be_kind_to_your_child.html" rel="nofollow">http://www.oreillynet.com/ruby/blog/2007/04/nubygems_be_kind_to_your_child.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/comment-page-1/#comment-130</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 15 Apr 2007 22:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.rubyfleebie.com/how-to-access-a-class-method-from-an-instance/#comment-130</guid>
		<description>I like it. Most languages don&#039;t make the difference between a call to a class method and a call to an instance method.</description>
		<content:encoded><![CDATA[<p>I like it. Most languages don&#8217;t make the difference between a call to a class method and a call to an instance method.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

