dry-types

Array With Member

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

PostStatuses = Types::Strict::Array.member(Types::Coercible::String)

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