Method: Dry::Data::Type::Enum#initialize
- Defined in:
- lib/dry/data/type/enum.rb
#initialize(values, type) ⇒ Enum
Returns a new instance of Enum.
8 9 10 11 12 |
# File 'lib/dry/data/type/enum.rb', line 8 def initialize(values, type) @values = values.freeze @type = type values.each(&:freeze) end |