enummer icon indicating copy to clipboard operation
enummer copied to clipboard

Allow initializing enummer with hash

Open GabrielNagy opened this issue 6 months ago • 4 comments

Similar to the Rails enum behavior, allow initializing an enummer with a hash where the values correspond to the indices of the bits that map to the flag.

This is a more robust and backwards-compatible approach to enums, as the developer doesn't have to worry about migrating historical data if an enum value is removed.

I also took the liberty of running standardrb on the entire project, seeing as the gem is part of the development dependencies.

Thanks again for this useful gem!

GabrielNagy avatar Aug 07 '24 10:08 GabrielNagy