Method: Dry::Schema::Macros::Value#build_array_type
- Defined in:
- lib/dry/schema/macros/value.rb
#build_array_type(array_type, member) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/dry/schema/macros/value.rb', line 89 def build_array_type(array_type, member) if array_type.respond_to?(:of) array_type.of(member) else raise ArgumentError, " Cannot define schema for a nominal array type.\n Array types must be instances of Dry::Types::Array,\n usually constructed with Types::Constructor(Array) { ... } or\n Dry::Types['array'].constructor { ... }\n ERROR\n end\nend\n".split("\n").join(" ") |