class Dry::Types::Enum
def initialize(type, **options)
- Api: - private
Options Hash:
(**options)
-
:values
(Array
) --
Parameters:
-
options
(Hash
) -- -
type
(Type
) --
def initialize(type, **options) super @mapping = options.fetch(:mapping).freeze @values = @mapping.keys.freeze @inverted_mapping = @mapping.invert.freeze freeze end