instance method
deconstantize
Ruby on Rails 6.1.7.10
Since v3.2.22.5Signature
deconstantize()
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 ActiveSupport::Inflector.deconstantize.
See also demodulize.
Source
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 181
def deconstantize
ActiveSupport::Inflector.deconstantize(self)
end
Defined in activesupport/lib/active_support/core_ext/string/inflections.rb line 181
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in String