You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My expectation would be that camelize_lower would default to the downcase spelling of the acronym
inflector.camelize_lower('api-key')
=> "apiKey"
inflector.camelize_lower('api')
=> "api"
My environment
Ruby 3.1.2, MacOS Ventura 13.4.1
The text was updated successfully, but these errors were encountered:
This does break the expectation on these tests, but I guess my question here is, aren't they strange assumptions on lower camelcase? The last two seem especially strange, I'm not sure I would expect someone to purposely lower_camelize a string that they, essentially, want to classify.
Describe the bug
When trying to camelize_lower a string with a known acronym like 'API', Dry::Inflector instance resolves to camelize_upper.
To Reproduce
require 'dry/inflector'
inflector = Dry::Inflector.new
inflector.camelize_lower('api-key')
=> "APIKey"
inflector.camelize_lower('api')
=> "API"
inflector.camelize_lower('key-api')
=> "keyAPI"
Expected behavior
My expectation would be that camelize_lower would default to the downcase spelling of the acronym
inflector.camelize_lower('api-key')
=> "apiKey"
inflector.camelize_lower('api')
=> "api"
My environment
Ruby 3.1.2, MacOS Ventura 13.4.1
The text was updated successfully, but these errors were encountered: