enummer
enummer copied to clipboard
Allow initializing enummer with hash
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!