class String

def underscore

Experimental RBS support (using type sampling data from the type_fusion project).

def underscore: () -> String

This signature was generated using 6 samples from 1 application.

See ActiveSupport::Inflector.underscore.

'ActiveModel::Errors'.underscore # => "active_model/errors"
'ActiveModel'.underscore # => "active_model"

+underscore+ will also change '::' to '/' to convert namespaces to paths.

The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string.
def underscore
  ActiveSupport::Inflector.underscore(self)
end