dry-rb / dry-inflector

Inflector for Ruby
https://dry-rb.org/gems/dry-inflector
MIT License
95 stars 15 forks source link

Attempt to address unexpected inflections #47

Closed parndt closed 1 year ago

parndt commented 1 year ago

Addresses #46

When working with inflections containing multiple words, whether they are separated by, for example, a space or underscore or hyphen we aren't seeing the expected results.

I've addressed the singularization problem by not checking for the match only at the start of the string.

I've addresses the uncountable? problem by splitting the inflection into 'words' and then inflecting the final 'word'.

parndt commented 1 year ago

Can you please change the PR title with something more explicative that can be added to the CHANGELOG? Thanks. 🙏

Well, I was about to, but it got merged already 😄 thanks