module Anthropic::Internal::Type::Union
def variant(key, spec = nil)
(**spec)
-
:"nil?"
(Boolean
) -- -
:union
(Proc
) -- -
:enum
(Proc
) -- -
:const
(NilClass, TrueClass, FalseClass, Integer, Float, Symbol
) --
Parameters:
-
spec
(Hash{Symbol=>Object}, Proc, Anthropic::Internal::Type::Converter, Class
) -- . -
key
(Symbol, Hash{Symbol=>Object}, Proc, Anthropic::Internal::Type::Converter, Class
) --
Other tags:
- Api: - private
def variant(key, spec = nil) t_info = key ymbol ey, Anthropic::Internal::Type::Converter.type_info(spec)] roc | Anthropic::Internal::Type::Converter | Class | Hash il, Anthropic::Internal::Type::Converter.type_info(key)] variants << variant_info