Class: Dry::Types::Array
- Inherits:
-
Definition
- Object
- Definition
- Dry::Types::Array
- Defined in:
- lib/dry/types/array.rb,
lib/dry/types/array/member.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Member
Instance Attribute Summary
Attributes inherited from Definition
Attributes included from Options
Instance Method Summary collapse
Methods inherited from Definition
[], #call, #constrained?, #default?, #failure, #initialize, #name, #optional?, #primitive?, #success, #to_ast, #try
Methods included from Builder
#constrained, #constrained_type, #constructor, #default, #enum, #maybe, #optional, #safe, #|
Methods included from Options
#initialize, #meta, #pristine, #with
Constructor Details
This class inherits a constructor from Dry::Types::Definition
Instance Method Details
#of(type) ⇒ Array::Member
11 12 13 14 15 16 17 18 19 |
# File 'lib/dry/types/array.rb', line 11 def of(type) member = case type when String then Types[type] else type end Array::Member.new(primitive, **, member: member) end |