deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH] Remove capitalize from core-ext/string.rb ... to address JIRA DTACLOUD104
Date Tue, 15 Nov 2011 18:57:01 GMT
On Tue, 2011-11-15 at 16:41 +0100, Michal Fojtik wrote:
> 
> marios@redhat.com wrote:
> > From: marios <marios@redhat.com>
> > 
> > https://issues.apache.org/jira/browse/DTACLOUD-104 May be a typo but
> > not sure what the intended behaviour was here. Ruby already provides
> > a capitalize ("String" from "STRING" or "sTRiNG") and also an
> > 'upcase' ("STRING" from "StrING" or "string").
> > 
> 
> I would prefer to use cimi_capitalize in order to avoid conflict with
> Ruby instead of deleting that method. But maybe lutter can explain why
> he used this override.

Clearly, it's much better than the one provided by Ruby ;)

Seriously though, the way it is used in cimi/model/schema.rb, it's used
to map 'camelCased' to 'CamelCased'; to avoid confusion we should rename
it to something like 'upcase_first' or similar.

David



Mime
View raw message