<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Understanding class methods in ruby</title>
	<link>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/</link>
	<description>Because programming should be fun</description>
	<pubDate>Sat, 22 Nov 2008 06:37:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>

	<item>
		<title>By: Mr eel</title>
		<link>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-113</link>
		<author>Mr eel</author>
		<pubDate>Thu, 12 Apr 2007 01:19:30 +0000</pubDate>
		<guid>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-113</guid>
					<description>'A class method isn’t ’shared’ since it’s instances cannot access it.'

This isn't actually true. An instance can access a class method via super. Like so:

self.super.class_method</description>
		<content:encoded><![CDATA[<p>&#8216;A class method isn’t ’shared’ since it’s instances cannot access it.&#8217;</p>
<p>This isn&#8217;t actually true. An instance can access a class method via super. Like so:</p>
<p>self.super.class_method</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Frank</title>
		<link>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-114</link>
		<author>Frank</author>
		<pubDate>Thu, 12 Apr 2007 01:52:44 +0000</pubDate>
		<guid>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-114</guid>
					<description>Hmmm... I should have check your code before actually update my post (I'm learning how to blog everyday). You cannot access a class method the way you have indicated. super is for super classes, not for class methods.
</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230; I should have check your code before actually update my post (I&#8217;m learning how to blog everyday). You cannot access a class method the way you have indicated. super is for super classes, not for class methods.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Clinton Forbes</title>
		<link>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-115</link>
		<author>Clinton Forbes</author>
		<pubDate>Thu, 12 Apr 2007 01:53:56 +0000</pubDate>
		<guid>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-115</guid>
					<description>Great post, as usual, Fleebie.

I was aware that I could define class methods using:

def self.class_method

But I didn't know about:

def Test.class_method

I will start using the second method because it is a lot clearer to me.</description>
		<content:encoded><![CDATA[<p>Great post, as usual, Fleebie.</p>
<p>I was aware that I could define class methods using:</p>
<p>def self.class_method</p>
<p>But I didn&#8217;t know about:</p>
<p>def Test.class_method</p>
<p>I will start using the second method because it is a lot clearer to me.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Frank</title>
		<link>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-123</link>
		<author>Frank</author>
		<pubDate>Fri, 13 Apr 2007 13:39:12 +0000</pubDate>
		<guid>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-123</guid>
					<description>Thanks Clinton,

I also prefer to use Test.class_method over self.class_method. It just feels more natural and intuitive to me.</description>
		<content:encoded><![CDATA[<p>Thanks Clinton,</p>
<p>I also prefer to use Test.class_method over self.class_method. It just feels more natural and intuitive to me.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Paolo Perrotta</title>
		<link>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-152</link>
		<author>Paolo Perrotta</author>
		<pubDate>Thu, 19 Apr 2007 00:34:00 +0000</pubDate>
		<guid>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-152</guid>
					<description>Most Ruby coders actually prefer self.class_method to Test.class_method. The main rationale is that Test.class_method violates the "Don't Repeat Yourself" principle - you're repeating the name of the class in different places. If the name changes, you'll have to change it into all class methods definition.

As with all matters of style, YMMV.</description>
		<content:encoded><![CDATA[<p>Most Ruby coders actually prefer self.class_method to Test.class_method. The main rationale is that Test.class_method violates the &#8220;Don&#8217;t Repeat Yourself&#8221; principle - you&#8217;re repeating the name of the class in different places. If the name changes, you&#8217;ll have to change it into all class methods definition.</p>
<p>As with all matters of style, YMMV.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: sadeesh</title>
		<link>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-615</link>
		<author>sadeesh</author>
		<pubDate>Sat, 07 Jun 2008 02:31:01 +0000</pubDate>
		<guid>http://www.rubyfleebie.com/understanding-class-methods-in-ruby/#comment-615</guid>
					<description>these basic are really useful to me to understand the class methods especially example with the notation "</description>
		<content:encoded><![CDATA[<p>these basic are really useful to me to understand the class methods especially example with the notation &#8220;</p>
]]></content:encoded>
				</item>
</channel>
</rss>
