class

String

Inherits Comparable < Reference < Object

String extensions for inflection using Wordsmith

Instance methods

camelcase
Source
classify
Source
foreign_key
Source
pluralize
Source
singularize
Source
tableize
Source
underscore

Converts camelcase boundaries to underscores.

"DoesWhatItSaysOnTheTin".underscore                         # => "does_what_it_says_on_the_tin"
"PartyInTheUSA".underscore                                  # => "party_in_the_usa"
"HTTP_CLIENT".underscore                                    # => "http_client"
"3.14IsPi".underscore                                       # => "3.14_is_pi"
"InterestingImage".underscore(Unicode::CaseOptions::Turkic) # => "ınteresting_ımage"
Source