This is my setup:
The folder structure is not a gem, just plain old Ruby code:
.
├── classes
│ ├── crawl.rb
│ └── page.rb
└── run.rb
The problem is that yard does not see any files.
yard doc
yields this output:
Files: 0
Modules: 0 ( 0 undocumented)
Classes: 0 ( 0 undocumented)
Constants: 0 ( 0 undocumented)
Methods: 0 ( 0 undocumented)
0.00% documented
Any ideas why it can't see any of my files, or isn't
Edit (Additional info):
Yard does have permissions to create files.
After I run the yard doc
command, my directory shows yard files:
. .. .yardoc classes doc run.rb
Edit (response to comment about rdoc)
Once I delete the doc folder that yard creates (rdoc complains about it) rm -rf doc
, rdoc generates documentation and provides this output
Files: 7
Classes: 6 ( 4 undocumented)
Modules: 0 ( 0 undocumented)
Constants: 2 ( 2 undocumented)
Attributes: 18 (18 undocumented)
Methods: 24 (20 undocumented)
Total: 50 (44 undocumented)
12.00% documented
Edit (Additional info)
Yard does not work for me on other ruby builds including MRI 1.8.7 and jRuby 1.6.4. It behaves the same way as described above
Yard does not automatically document all ruby files in a directory structure. It looks for files in a ./lib
directory. If you want to document others, you must specify that in the command or in a .yardopts file
example
yard classes/*.rb *.rb