method
deconstantize
v4.2.7 -
Show latest stable
- Class:
ActiveSupport::Inflector
deconstantize(path)public
Removes the rightmost segment from the constant expression in the string.
'Net::HTTP'.deconstantize # => "Net" '::Net::HTTP'.deconstantize # => "::Net" 'String'.deconstantize # => "" '::String'.deconstantize # => "" ''.deconstantize # => ""
See also demodulize.