You are correct: inlinedocs can currently only generate documentation for S4 classes defined in the usual way, as indicated in the examples. Out of curiousity, why do you define S4 classes inside of functions?