Closed miyagawa closed 11 years ago
When you call .tomdoc on a method without any TomDoc documentation, the method will throw errors:
.tomdoc
NoMethodError: undefined method `sub' for nil:NilClass .../tomdoc/lib/tomdoc/tomdoc.rb:130:in `tomdoc'
You can work around by calling .valid? before calling it, but other method such as raw works fine, and the error message isn't useful anyway.
.valid?
raw
This patch fixes it by simply returning '' for comment.tomdoc in case of no comments.
comment.tomdoc
When you call
.tomdoc
on a method without any TomDoc documentation, the method will throw errors:You can work around by calling
.valid?
before calling it, but other method such asraw
works fine, and the error message isn't useful anyway.This patch fixes it by simply returning '' for
comment.tomdoc
in case of no comments.