Merging the modifiers is strange.
Therefor, drop all the functions that accept a Spec, (except from accept).
Add instead extension-function attach and attachTo.
attachTo will have 2 parameters, a mendatory Acceptor, where the spec will be attached to and a builder-function, to modify the spec.
attach will be the same, but it replaces the mendatory acceptor with the Acceptor.
This will give the user themselves the choice to add the function with Spec and how to implement them.
Functions like that should be documented as well.
(attachTo could be added later, when KotlinPoetDSL tries to be more composable)
Merging the modifiers is strange. Therefor, drop all the functions that accept a Spec, (except from accept).
Add instead extension-function attach and attachTo. attachTo will have 2 parameters, a mendatory Acceptor, where the spec will be attached to and a builder-function, to modify the spec. attach will be the same, but it replaces the mendatory acceptor with the Acceptor.
This will give the user themselves the choice to add the function with Spec and how to implement them. Functions like that should be documented as well.
(attachTo could be added later, when KotlinPoetDSL tries to be more composable)