<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: On the Existence of Struct::Group in Rails</title>
	<atom:link href="http://trevorturk.wordpress.com/2008/11/15/on-the-existence-of-structgroup-in-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevorturk.wordpress.com/2008/11/15/on-the-existence-of-structgroup-in-rails/</link>
	<description>A chess-playing machine of the late 18th century, promoted as an automaton but later proved a hoax.</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:13:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Mohit Jain</title>
		<link>http://trevorturk.wordpress.com/2008/11/15/on-the-existence-of-structgroup-in-rails/#comment-737</link>
		<dc:creator><![CDATA[Mohit Jain]]></dc:creator>
		<pubDate>Wed, 27 Jul 2011 23:14:13 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=868#comment-737</guid>
		<description><![CDATA[Thanks dude.. Saved my time.. ]]></description>
		<content:encoded><![CDATA[<p>Thanks dude.. Saved my time..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://trevorturk.wordpress.com/2008/11/15/on-the-existence-of-structgroup-in-rails/#comment-736</link>
		<dc:creator><![CDATA[Trevor]]></dc:creator>
		<pubDate>Sun, 16 Nov 2008 01:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=868#comment-736</guid>
		<description><![CDATA[Maybe I should say... surprising? In my case, I didn&#039;t expect that calling Group.find from within a Struct would be any different from calling it elsewhere in my app. The fact that Struct::Group already existed came from way out in left field, to me at least. ]]></description>
		<content:encoded><![CDATA[<p>Maybe I should say&#8230; surprising? In my case, I didn&#039;t expect that calling Group.find from within a Struct would be any different from calling it elsewhere in my app. The fact that Struct::Group already existed came from way out in left field, to me at least.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Todd</title>
		<link>http://trevorturk.wordpress.com/2008/11/15/on-the-existence-of-structgroup-in-rails/#comment-735</link>
		<dc:creator><![CDATA[Matt Todd]]></dc:creator>
		<pubDate>Sat, 15 Nov 2008 20:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=868#comment-735</guid>
		<description><![CDATA[Not weird at all, it&#039;s just a scoping issue... if you&#039;re asking for Group inside of a scope that has it defined, it will return the first one instead of the one outside of the first scope checked (which is usually always the local scope).
 

 
When you prefix two colons like ::Group you&#039;re actually saying Object::Group which tells Ruby to look in the scope of the Object class which will see the right class because the other one is only local inside of the Struct class object.
 

 
If I can clarify further, let me know.
 

 
Matt ]]></description>
		<content:encoded><![CDATA[<p>Not weird at all, it&#039;s just a scoping issue&#8230; if you&#039;re asking for Group inside of a scope that has it defined, it will return the first one instead of the one outside of the first scope checked (which is usually always the local scope).</p>
<p>When you prefix two colons like ::Group you&#039;re actually saying Object::Group which tells Ruby to look in the scope of the Object class which will see the right class because the other one is only local inside of the Struct class object.</p>
<p>If I can clarify further, let me know.</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://trevorturk.wordpress.com/2008/11/15/on-the-existence-of-structgroup-in-rails/#comment-734</link>
		<dc:creator><![CDATA[Trevor]]></dc:creator>
		<pubDate>Sat, 15 Nov 2008 16:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=868#comment-734</guid>
		<description><![CDATA[I believe if you did it that way, you&#039;d need to &lt;a href=&quot;http://www.ruby-doc.org/docs/UsersGuide/rg/objinitialization.html&quot; rel=&quot;nofollow&quot;&gt;define the initialize method&lt;/a&gt; as well, so that you could pass in your variables. That&#039;s fine, but it would be a bit more code. ]]></description>
		<content:encoded><![CDATA[<p>I believe if you did it that way, you&#039;d need to <a href="http://www.ruby-doc.org/docs/UsersGuide/rg/objinitialization.html" rel="nofollow">define the initialize method</a> as well, so that you could pass in your variables. That&#039;s fine, but it would be a bit more code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Wilden</title>
		<link>http://trevorturk.wordpress.com/2008/11/15/on-the-existence-of-structgroup-in-rails/#comment-733</link>
		<dc:creator><![CDATA[Mark Wilden]]></dc:creator>
		<pubDate>Sat, 15 Nov 2008 15:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=868#comment-733</guid>
		<description><![CDATA[Thanks for the heads-up.
 

 
How is
 

 
 class NewsletterJob &lt; Struct.new(:text, :emails)
 
 end
 

 
different from
 

 
 class NewsletterJob
 
   attr_accessor :text, :emails
 
 end
 

 
? ]]></description>
		<content:encoded><![CDATA[<p>Thanks for the heads-up.</p>
<p>How is</p>
<p> class NewsletterJob &lt; Struct.new(:text, :emails)</p>
<p> end</p>
<p>different from</p>
<p> class NewsletterJob</p>
<p>   attr_accessor :text, :emails</p>
<p> end</p>
<p>?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

