<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.vitarara.org/cms" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Vita Rara: A Life Uncommon - Refactoring</title>
 <link>http://www.vitarara.org/cms/taxonomy/term/99/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>Refactoring: Introduce Local Extension in Ruby</title>
 <link>http://www.vitarara.org/cms/refactoring_introduce_local_extension_in_ruby</link>
 <description>&lt;p&gt;I was recently reading Martin Fowler&#039;s &lt;a href=&quot;&quot;&gt;Refactoring&lt;/a&gt;. While I was reading Introduce Local Extension (p. 164) all I could think of was how simple it is to implement in Ruby.&lt;/p&gt;
&lt;h2&gt;Motivation&lt;/h2&gt;
&lt;p&gt;As Fowler says in the motivation section writers of classes and libraries are not omniscient. Inevitably some class that you&#039;re using will be missing some feature you want. Using Introduce Local Extension you can add that additional functionality when you need it. &lt;/p&gt;
&lt;p&gt;In a statically typed language, like Java, this refactoring would involve creating either a wrapping class or a descendent of the original class. In Ruby we will accomplish the same thing using a mixin.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.vitarara.org/cms/refactoring_introduce_local_extension_in_ruby&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.vitarara.org/cms/refactoring_introduce_local_extension_in_ruby#comment</comments>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/7">Programming</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/99">Refactoring</category>
 <category domain="http://www.vitarara.org/cms/taxonomy/term/82">Ruby</category>
 <pubDate>Fri, 30 Jan 2009 17:08:20 -0500</pubDate>
 <dc:creator>Mark</dc:creator>
 <guid isPermaLink="false">173 at http://www.vitarara.org/cms</guid>
</item>
</channel>
</rss>

