Class: Params::Registry::Types::Container
- Inherits:
-
Dry::Types::Nominal
- Object
- Dry::Types::Nominal
- Params::Registry::Types::Container
show all
- Defined in:
- lib/params/registry/types.rb
Overview
XXX okay so once again dry-types has to be weird as hell. What we
want are Set.of
and Range.of
just like the built-in
Array.of
. What we have to do to achieve this is god-knows-what.
Defined Under Namespace
Classes: Constructor, Member
Composite types not already defined
collapse
Instance Method Details
#constructor_type ⇒ Object
156
|
# File 'lib/params/registry/types.rb', line 156
def constructor_type = Container::Constructor
|
#member_type ⇒ Object
154
|
# File 'lib/params/registry/types.rb', line 154
def member_type = Container::Member
|
#of(type) ⇒ Object
158
159
160
161
162
163
164
165
|
# File 'lib/params/registry/types.rb', line 158
def of(type)
member = case type
when ::String then ::Dry::Types[type]
else type
end
member_type.new(primitive, **options, member: member)
end
|