incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tong Li <liton...@us.ibm.com>
Subject Re: [PATCH core 2/4] Core: Fixed .pluralize to deal with values like 'property' => 'properties'
Date Fri, 18 Nov 2011 15:16:19 GMT
OK
Tong Li
Emerging Technologies & Standards
Building 501/B205
litong01@us.ibm.com

mfojtik@redhat.com wrote on 11/18/2011 08:32:31 AM:

> From: mfojtik@redhat.com
> To: deltacloud-dev@incubator.apache.org
> Date: 11/18/2011 08:32 AM
> Subject: [PATCH core 2/4] Core: Fixed .pluralize to deal with values
> like 'property' => 'properties'
>
> From: Michal Fojtik <mfojtik@redhat.com>
>
>
> Signed-off-by: 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 53b3984..de56c99 100644
> --- a/server/lib/deltacloud/core_ext/string.rb
> +++ b/server/lib/deltacloud/core_ext/string.rb
> @@ -34,6 +34,7 @@ class String
>
>    def pluralize
>      return self + 'es' if self =~ /ess$/
> +    return self[0, self.length-1] + "ies" if self =~ /ty$/
>      self + "s"
>    end
>
> --
> 1.7.4.4
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message