class Dry::Types::Array
Array
type can be used to define an array with optional member type
@api public
@api public
Public Instance Methods
constructor_type()
click to toggle source
@api private
# File lib/dry/types/array.rb, line 27 def constructor_type ::Dry::Types::Array::Constructor end
of(type)
click to toggle source
Build an array type with a member type
@param [Type,#call] type
@return [Array::Member]
@api public
# File lib/dry/types/array.rb, line 16 def of(type) member = case type when String then Types[type] else type end Array::Member.new(primitive, **options, member: member) end