deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@redhat.com
Subject [PATCH 4/4] Adds exception to String::pluralize for 'data' ("metadata".pluralize != "metadatas")
Date Thu, 08 Dec 2011 14:24:52 GMT
From: marios <marios@redhat.com>


Signed-off-by: marios <marios@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..b3e2dbe 100644
--- a/server/lib/deltacloud/core_ext/string.rb
+++ b/server/lib/deltacloud/core_ext/string.rb
@@ -35,6 +35,7 @@ class String
   def pluralize
     return self + 'es' if self =~ /ess$/
     return self[0, self.length-1] + "ies" if self =~ /ty$/
+    return self if self =~ /data$/
     self + "s"
   end
 
-- 
1.7.6.4


Mime
View raw message