RailsApp Rails Yard 2018年 11月 14日
昨日までに記載したメソッドの上には定型的なコメントを書いていた. これは,YARD と呼ばれる Documentation Tool のためのコメントである. あまりサンプルがが大きくなる前に紹介しておく. ちなみに,YARD は Yay! A Ruby Documentation Tool らしい.他のものと同じで Yet another XXX 系かと思っていたが違っていた.
group :development do
gem 'yard'
(中略)
end
$ bundle
Fetching yard 0.9.16
Installing yard 0.9.16
$ be yard
Files: 5
Modules: 1 ( 1 undocumented)
Classes: 4 ( 4 undocumented)
Constants: 0 ( 0 undocumented)
Attributes: 0 ( 0 undocumented)
Methods: 12 ( 1 undocumented)
64.71% documented
$ ls -R doc
ApplicationController.html file.README.html
ApplicationHelper.html file_list.html
ApplicationJob.html frames.html
ApplicationRecord.html index.html
PagesController.html js
_index.html method_list.html
class_list.html top-level-namespace.html
css
doc/css:
common.css full_list.css style.css
doc/js:
app.js full_list.js jquery.js
スクリーンショットで場所を取ってしまったので今日はここまで