Module: Cameltoe::Extensions::String

Included in:
String
Defined in:
lib/cameltoe.rb

Overview

Cameltoe extends the string object

Methods in Cameltoe::String are automatically included for use in the String class. Feel free to use any of Cameltoe::String’s methods on Strings themselves.

Instance Method Summary collapse

Instance Method Details

#cameltoeize(inverse_mode = false) ⇒ Object

By default, cameltoeize converts strings to CameLtoEcasE. If the argument to camelize is set to “:inverse” then camelize produces iNVERSECaMeLTOECASe.

Examples

"Lindsay Lohan".cameltoeize #=> "LindSayLohaN"
"Jessica Simpson".cameltoeize #=> "JessiCasImpsoN" 
"Britney Spears".cameltoeize(:inverse) #=> "bRITNeYsPEARs"
"Anna Kournikova".cameltoeize(:inverse) #=> "aNNAKoURnIKOVa"


79
80
81
# File 'lib/cameltoe.rb', line 79

def cameltoeize(inverse_mode = false)
  Cameltoe::String.cameltoeize(self, inverse_mode)
end