ruby - Yard and C extension -
i have c ruby extension document rdoc. there both c files , ruby files parsed rdoc.
does yard can same , there "easy way", (i mean commonly used way) migrate rdoc yard?
as @neil slater said, yard can parse rdoc style documentation 1 exception :call-seq
tag rdoc. equivalent @overload
yard. (see rdoc, darkfish, , :call-seq: tag)
for me used rake task in order generate rdoc documentation:
require "rdoc/task" rdoc_files = filelist["readme.rdoc", "ext/clangc/clangc.c", "ext/clangc/constants.c", "ext/clangc/class_index.c", "ext/clangc/class_translationunit.c", "lib/clangc.rb"] rake::rdoctask.new |rd| rd.main = "readme.rdoc" rd.rdoc_dir = "doc" rd.rdoc_files.include(rdoc_files) end
i have launch rake rdoc
in order use yard instead, have create rake task this:
require "yard" yard_files = filelist["ext/clangc/clangc.c", "ext/clangc/class_index.c", "ext/clangc/class_translationunit.c", "lib/clangc.rb"] yard::rake::yardoctask.new |t| t.files = yard_files # optional t.options = %w(-o yard_documentation --readme readme.rdoc) # optional end
then use rake yard
. there still errors begining.
Comments
Post a Comment