dry-types/docsite/source/array-with-member.html.md

246 B

title layout name
Array With Member gem-single dry-types

The built-in array type supports defining the member's type:

PostStatuses = Types::Array.of(Types::Coercible::String)

PostStatuses[[:foo, :bar]] # ["foo", "bar"]