Class: Dry::Types::Array
- Defined in:
- lib/dry/types/array.rb,
lib/dry/types/array/member.rb,
lib/dry/types/array/constructor.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Constructor, Member
Instance Attribute Summary collapse
- #options ⇒ Hash included from Options readonly private
Instance Method Summary collapse
- #constructor_type ⇒ Object private
-
#of(type) ⇒ Array::Member
Build an array type with a member type.
Constructor Details
This class inherits a constructor from Dry::Types::Nominal
Instance Attribute Details
Instance Method Details
#constructor_type ⇒ 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.
27 28 29 |
# File 'lib/dry/types/array.rb', line 27 def constructor_type ::Dry::Types::Array::Constructor end |
#of(type) ⇒ Array::Member
Build an array type with a member type
16 17 18 19 20 21 22 23 24 |
# 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, **, member: member) end |