<?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: factory method in ruby</title>
	<atom:link href="http://silkandspinach.net/2009/07/14/factory-method-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/</link>
	<description>development, by example</description>
	<lastBuildDate>Mon, 19 Mar 2012 12:48:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Kevin Rutherford</title>
		<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/#comment-15566</link>
		<dc:creator><![CDATA[Kevin Rutherford]]></dc:creator>
		<pubDate>Fri, 24 Jul 2009 08:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=1018#comment-15566</guid>
		<description><![CDATA[@Daniel, I agree with your concern about name clashes. In the final code I did indeed name the methods &#039;to_reek_source&#039;.]]></description>
		<content:encoded><![CDATA[<p>@Daniel, I agree with your concern about name clashes. In the final code I did indeed name the methods &#8216;to_reek_source&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Lucraft</title>
		<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/#comment-15565</link>
		<dc:creator><![CDATA[Daniel Lucraft]]></dc:creator>
		<pubDate>Fri, 24 Jul 2009 08:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=1018#comment-15565</guid>
		<description><![CDATA[That&#039;s great, but aren&#039;t you worried about naming conflicts with other gems? You could call the methods &#039;to_reek_source&#039; instead for instance. Or if you&#039;re not worried about this, why not?]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s great, but aren&#8217;t you worried about naming conflicts with other gems? You could call the methods &#8216;to_reek_source&#8217; instead for instance. Or if you&#8217;re not worried about this, why not?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashley Moran</title>
		<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/#comment-15556</link>
		<dc:creator><![CDATA[Ashley Moran]]></dc:creator>
		<pubDate>Sun, 19 Jul 2009 10:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=1018#comment-15556</guid>
		<description><![CDATA[The thing that makes me go hmmm is (still) the way reek accepts both source and pathnames.  If this was not the case, you could define #to_source_string on String, File, IO, etc, and have a method like Source.from_source_source - possibly without the homonym abuse.  That would factor out the `Reek::Source.new`, but leave the conversion code where it belongs.

(BTW I&#039;m starting to prefer instance-method factory methods, having used a few lately.)]]></description>
		<content:encoded><![CDATA[<p>The thing that makes me go hmmm is (still) the way reek accepts both source and pathnames.  If this was not the case, you could define #to_source_string on String, File, IO, etc, and have a method like Source.from_source_source &#8211; possibly without the homonym abuse.  That would factor out the `Reek::Source.new`, but leave the conversion code where it belongs.</p>
<p>(BTW I&#8217;m starting to prefer instance-method factory methods, having used a few lately.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TimM</title>
		<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/#comment-15555</link>
		<dc:creator><![CDATA[TimM]]></dc:creator>
		<pubDate>Fri, 17 Jul 2009 16:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=1018#comment-15555</guid>
		<description><![CDATA[This is actually a common pattern in Smalltalk (which I recall the Gof book also used?) and I think they use the term Converter as well, so your in a good place!]]></description>
		<content:encoded><![CDATA[<p>This is actually a common pattern in Smalltalk (which I recall the Gof book also used?) and I think they use the term Converter as well, so your in a good place!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaz</title>
		<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/#comment-15554</link>
		<dc:creator><![CDATA[Chaz]]></dc:creator>
		<pubDate>Thu, 16 Jul 2009 03:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=1018#comment-15554</guid>
		<description><![CDATA[It&#039;s a good enough name, and now I at least have something to call these.  I use C# extension methods to do exactly this sort of thing.]]></description>
		<content:encoded><![CDATA[<p>It&#8217;s a good enough name, and now I at least have something to call these.  I use C# extension methods to do exactly this sort of thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Rutherford</title>
		<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/#comment-15553</link>
		<dc:creator><![CDATA[Kevin Rutherford]]></dc:creator>
		<pubDate>Tue, 14 Jul 2009 18:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=1018#comment-15553</guid>
		<description><![CDATA[Nice, thanks for the link. In my example above, the name-collision problem is another force pushing back towards the Java-style Factory Method approach. I suppose naming the extension methods &quot;to_reek_source&quot; would pretty much avoid that possibility too.]]></description>
		<content:encoded><![CDATA[<p>Nice, thanks for the link. In my example above, the name-collision problem is another force pushing back towards the Java-style Factory Method approach. I suppose naming the extension methods &#8220;to_reek_source&#8221; would pretty much avoid that possibility too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Kubb</title>
		<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/#comment-15552</link>
		<dc:creator><![CDATA[Dan Kubb]]></dc:creator>
		<pubDate>Tue, 14 Jul 2009 16:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=1018#comment-15552</guid>
		<description><![CDATA[There was an article last month that kicked off a series of other blog posts on solving a related problem to yours:

http://sandimetz.com/2009/06/ruby-case-statements-and-kindof.html]]></description>
		<content:encoded><![CDATA[<p>There was an article last month that kicked off a series of other blog posts on solving a related problem to yours:</p>
<p><a href="http://sandimetz.com/2009/06/ruby-case-statements-and-kindof.html" rel="nofollow">http://sandimetz.com/2009/06/ruby-case-statements-and-kindof.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Rutherford</title>
		<link>http://silkandspinach.net/2009/07/14/factory-method-in-ruby/#comment-15551</link>
		<dc:creator><![CDATA[Kevin Rutherford]]></dc:creator>
		<pubDate>Tue, 14 Jul 2009 16:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=1018#comment-15551</guid>
		<description><![CDATA[Doh! I&#039;ve just figured out the major reason to use Converters: The need to know which parts of the object should be dug out and passed to the Source&#039;s constructor. The example above is trivial in this regard, but one could imagine it being a deal-clincher for something big and hairy that contains &quot;source code&quot; in a non-obvious (and non-public) way.

(See, this is why the Pomodoro technique doesn&#039;t work for me -- I&#039;m just so sloooow...)]]></description>
		<content:encoded><![CDATA[<p>Doh! I&#8217;ve just figured out the major reason to use Converters: The need to know which parts of the object should be dug out and passed to the Source&#8217;s constructor. The example above is trivial in this regard, but one could imagine it being a deal-clincher for something big and hairy that contains &#8220;source code&#8221; in a non-obvious (and non-public) way.</p>
<p>(See, this is why the Pomodoro technique doesn&#8217;t work for me &#8212; I&#8217;m just so sloooow&#8230;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

