- Support explicit nil values
- Update author email in gemspec
- Update RuboCop to version 0.91 and pin version
- Set minimum required_ruby_version to 2.6.0
- Bump .ruby-version to 2.6.6
- Implement
Enumerable
- Update to Rake 12.3.3
- Update to Ruby 2.6.5
- Update to Rake 10.4
- Update to RSpec 3.9
- Update to RuboCop 0.80
- Update to Ruby 2.4.1
- Update to rspec 3.7
- Update to RuboCop 0.52
- Update to Yard 0.9.12
-
The default
to_sforTypesafeEnum::Basenow includes the enum's class, key, value, and ordinal, e.g.Suit::DIAMONDS.to_s # => "Suit::DIAMONDS [1] -> diamonds"(Fixes #5.)
-
::find_by_value_strnow uses a hash lookup like the other::find_bymethods. -
Improved method documentation.
- Include the original call site in the warning message for duplicate instances to help with debugging.
- Modified gemspec to take into account SSH checkouts when determining the homepage URL.
- Exact duplicate instances (e.g. due to multiple
requires) are now ignored with a warning, instead of causing aNameError. Duplicate keys with different values, and duplicate values with different keys, still raise aNameError. NameErrorsdue to invalid keys or values no longer cause the enum class to be undefined. However, the invalid instances will still not be registered and no constants created for them.
- Fixed issue where invalid classes weren't properly removed after duplicate name declarations, polluting the namespace and causing duplicate declration error messages to be lost.
- Fixed issue where
::find_by_value_strfailed to returnnilfor bad values
- Added
::find_by_value_str
- Initial release