Class: McpToolkit::Serializer::AssociationDescriptor

Inherits:
Struct
  • Object
show all
Defined in:
lib/mcp_toolkit/serializer/association_descriptor.rb

Overview

The association shape the gem reads off a serializer's declared_associations (ResourceSchema's relationship entries, FieldSelection's valid fields names). A host adapting its OWN serializer framework builds these rather than re-deriving the duck-type by hand: links_key / type / polymorphic / name, plus an optional serializer responding to model_class (see TargetRef) so the target resource resolves.

Instance Attribute Summary collapse

Instance Attribute Details

Returns the value of attribute links_key

Returns:

  • (Object)

    the current value of links_key



9
10
11
# File 'lib/mcp_toolkit/serializer/association_descriptor.rb', line 9

def links_key
  @links_key
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/mcp_toolkit/serializer/association_descriptor.rb', line 9

def name
  @name
end

#polymorphicObject

Returns the value of attribute polymorphic

Returns:

  • (Object)

    the current value of polymorphic



9
10
11
# File 'lib/mcp_toolkit/serializer/association_descriptor.rb', line 9

def polymorphic
  @polymorphic
end

#serializerObject

Returns the value of attribute serializer

Returns:

  • (Object)

    the current value of serializer



9
10
11
# File 'lib/mcp_toolkit/serializer/association_descriptor.rb', line 9

def serializer
  @serializer
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/mcp_toolkit/serializer/association_descriptor.rb', line 9

def type
  @type
end