Module: Yarrow::Schema::Types::CompoundType

Included in:
List, Map
Defined in:
lib/yarrow/schema/types.rb

Instance Method Summary collapse

Instance Method Details

#instance(unit_type) ⇒ Object



145
146
147
148
# File 'lib/yarrow/schema/types.rb', line 145

def instance(unit_type)
  @unit = Instance.of(unit_type)
  self
end

#interface(*args) ⇒ Object



155
156
157
158
# File 'lib/yarrow/schema/types.rb', line 155

def interface(*args)
  @unit = Interface.of(args)
  self
end

#kind(unit_type) ⇒ Object



150
151
152
153
# File 'lib/yarrow/schema/types.rb', line 150

def kind(unit_type)
  @unit = Kind.of(unit_type)
  self
end