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