Class: Farce::Internal::DryTypes::SequenceType
- Inherits:
-
CollectionType
- Object
- CollectionType
- Farce::Internal::DryTypes::SequenceType
- Defined in:
- lib/farce/integrations/dry_types.rb
Overview
A Vector or Set type that applies a member type to every input value.
Instance Attribute Summary
Attributes inherited from CollectionType
Dry Types Integration collapse
-
#of(member) ⇒ SequenceType
Apply a dry type to every member before Farce construction.
Methods inherited from CollectionType
#call, #constrained?, #default?, #inspect, #meta, #name, #optional?, #primitive?, #pristine, #to_ast, #to_proc, #try, #valid?, #with
Instance Method Details
#of(member) ⇒ SequenceType
Apply a dry type to every member before Farce construction.
311 312 313 314 315 |
# File 'lib/farce/integrations/dry_types.rb', line 311 def of(member) typed = DryTypes.collection_source(source).of(member) typed = DryTypes.restore_optional_source(source, typed) self.class.new(typed, kind:, configuration:) end |