<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <id>tag:www.refactormycode.com,2007:users1537</id>
  <link type="application/atom+xml" href="http://www.refactormycode.com/users/1537" rel="self"/>
  <title>reprogrammer.myopenid.com</title>
  <updated>Thu Jun 11 16:40:05 -0700 2009</updated>
  <entry>
    <id>tag:www.refactormycode.com,2007:Refactor162115</id>
    <published>2009-06-11T16:40:05-07:00</published>
    <title>[Ruby] On Redundant Method Calls</title>
    <content type="html">&lt;p&gt;Do you say that it doesn't deserve a refactoring because there are only 7 method calls in my code snippet?
&lt;br /&gt;Does looking at the whole method by following the provided github link change your mind?&lt;/p&gt;

&lt;pre&gt;&lt;/pre&gt;</content>
    <author>
      <name>reprogrammer.myopenid.com</name>
      <email>reprogrammer@gmail.com</email>
    </author>
    <link type="text/html" href="http://www.refactormycode.com/codes/910-redundant-method-calls/refactors/162115" rel="alternate"/>
  </entry>
  <entry>
    <id>tag:www.refactormycode.com,2007:Code910</id>
    <published>2009-06-10T23:23:31-07:00</published>
    <updated>2009-06-11T16:40:05-07:00</updated>
    <title>[Ruby] Redundant Method Calls</title>
    <content type="html">&lt;p&gt;What is the best way to simplify a list of method calls on regular expressions?
&lt;br /&gt;See &lt;a href="http://github.com/rails/rails/blob/37be453a8709eb30c97f26369e352e5935436d97/activesupport/lib/active_support/inflections.rb" target="_blank"&gt;http://github.com/rails/rails/blob/37be453a8709eb30c97f26369e352e5935436d97/activesupport/lib/active_support/inflections.rb&lt;/a&gt; for more context.
&lt;/p&gt;

&lt;pre&gt;module ActiveSupport
  Inflector.inflections do |inflect|
    inflect.plural(/$/, 's')
    inflect.plural(/s$/i, 's')
    inflect.plural(/(ax|test)is$/i, '\1es')
    inflect.plural(/(octop|vir)us$/i, '\1i')
    inflect.plural(/(alias|status)$/i, '\1es')
    inflect.plural(/(bu)s$/i, '\1ses')
    inflect.plural(/(buffal|tomat)o$/i, '\1oes')
    ...
  end
end&lt;/pre&gt;</content>
    <author>
      <name>reprogrammer.myopenid.com</name>
      <email>reprogrammer@gmail.com</email>
    </author>
    <link type="text/html" href="http://www.refactormycode.com/codes/910-redundant-method-calls" rel="alternate"/>
  </entry>
</feed>

