Detect a type in a struct is a built-in type vs. custom type

Hi,
Is there some way for me to analyze a given struct, and select the attributes in it that are NOT corresponding to built-in types? (dry-rb - dry-types v1.7 - Built-in Types)

Yes, you would need to implement an ast visitor

Every struct object has a schema property that responds to to_ast.