incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m.@mifo.sk
Subject [PATCH core 1/2] Core: Fixed String core_ext to handle singularization of 'properties' kind of strings
Date Sat, 19 Nov 2011 17:56:44 GMT
From: Michal Fojtik <mfojtik@redhat.com>

---
 server/lib/deltacloud/core_ext/string.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/server/lib/deltacloud/core_ext/string.rb b/server/lib/deltacloud/core_ext/string.rb
index de56c99..7d7ae17 100644
--- a/server/lib/deltacloud/core_ext/string.rb
+++ b/server/lib/deltacloud/core_ext/string.rb
@@ -40,6 +40,7 @@ class String
 
   def singularize
     return self.gsub(/es$/, '') if self =~ /sses$/
+    return self.gsub(/ties$/, 'ty') if self =~ /ties$/
     self.gsub(/s$/, '')
   end
 
-- 
1.7.7.3


Mime
View raw message