Unfortunately macros only support positional arguments. Your better bet here would be to write a YARD plugin to handle this.
Plugin docs here: https://yardoc.org/guides/extending-yard/writing-handlers.html
You could publish a yard-dry-initializer plugin and use this to
document your code. YARD automatically looks for gems with the
`yard-` prefix (i.e. yard-FOO) and loads them if someone uses
"--plugin FOO" in their .yardopts or command line options.
Note that a plugin would not only solve the use case for your own
codebases, but it would allow your library's users to take
advantage of generated documentation in their own projects without
having to mess with complicated macro declarations. It's an all
around better solution even if you _could_ do this with macros.
Hope that helps,