class String

def camelize(first_letter = :upper)

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

def camelize: (?Symbol first_letter) -> String

This signature was generated using 1 sample from 1 application.

See ActiveSupport::Inflector.camelize.

+camelize+ is also aliased as +camelcase+.

'active_record/errors'.camelize(:lower) # => "activeRecord::Errors"
'active_record/errors'.camelize # => "ActiveRecord::Errors"
'active_record'.camelize(:lower) # => "activeRecord"
'active_record'.camelize # => "ActiveRecord"

+camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces.

is set to :lower then camelize produces lowerCamelCase.
By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize
def camelize(first_letter = :upper)
  case first_letter
  when :upper
    ActiveSupport::Inflector.camelize(self, true)
  when :lower
    ActiveSupport::Inflector.camelize(self, false)
  else
    raise ArgumentError, "Invalid option, use either :upper or :lower."
  end
end