class String
def deconstantize
"".deconstantize # => ""
"::String".deconstantize # => ""
"String".deconstantize # => ""
"::Net::HTTP".deconstantize # => "::Net"
"Net::HTTP".deconstantize # => "Net"
Removes the rightmost segment from the constant expression in the string.
def deconstantize ActiveSupport::Inflector.deconstantize(self) end