Method: Finitio::TypeFactory#subtype
- Defined in:
- lib/finitio/support/type_factory.rb
#subtype(super_type, constraints = nil, name = nil, metadata = nil, &bl) ⇒ Object
Sub and union
192 193 194 195 196 197 198 199 |
# File 'lib/finitio/support/type_factory.rb', line 192 def subtype(super_type, constraints = nil, name = nil, = nil, &bl) super_type = type(super_type) constraints = constraints(constraints, &bl) name = name(name) = () SubType.new(super_type, constraints, name, ) end |