# File lib/facets/core/string/singular.rb, line 11 def self.inflection_rules_by_singular return @inflection_rules_by_singular if @inflection_rules_by_singular sorted = inflection_rules.sort_by{ |b,s,pl| "#{b}#{s}".size }.reverse @inflection_rules_by_singular = sorted.collect do |b, s, pl| [ /(#{b})#{s}$/, '\1'+"#{pl}" ] end end