Skip to content

Organizing output class list into sections manually #1573

Answered by lsegal
balajivenkatesh asked this question in Q&A
Discussion options

You must be logged in to vote

YARD doesn't group based on directory or know about "models" as a concept. The reason you're seeing disconnected trees is because YARD has no context for the "Driver" code object in your hierarchy.

Based on layout you've described, there is no file that defines Driver as either a module or a class, and because it's undefined in your source, YARD treats it as an external class. As an external class, it is not generated as an expandable field.

Defining Vehicle::Driver as a module somewhere-- anywhere-- in your source should resolve this. Avoiding the shorthand class reopening syntax (see Rubocop's Style/ClassAndModuleChildren rule) would be an easy way to do this. In lib/vehicle/driver/assi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lsegal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #1354 on September 03, 2024 08:31.