# File lib/buildr/core/doc.rb, line 33 def engines @engines ||= [] end
# File lib/buildr/core/doc.rb, line 21 def select_by_lang(lang) fail 'Unable to define doc task for nil language' if lang.nil? engines.detect { |e| e.language.to_sym == lang.to_sym } end
# File lib/buildr/core/doc.rb, line 28 def select_by_name(name) fail 'Unable to define doc task for nil' if name.nil? engines.detect { |e| e.to_sym == name.to_sym } end
This method returns the project’s documentation task. It also accepts a list of source files, directories and projects to include when generating the docs.
By default the doc task uses all the source directories from compile.sources and generates documentation in the target/doc directory. This method accepts sources and adds them by calling Buildr::Doc::Base#from.
For example, if you want to generate documentation for a given project that includes all source files in two of its sub-projects:
doc projects('myapp:foo', 'myapp:bar').using(:windowtitle=>'Docs for foo and bar')
# File lib/buildr/core/doc.rb, line 268 def doc(*sources, &block) task('doc').from(*sources).enhance &block end
# File lib/buildr/core/doc.rb, line 272 def javadoc(*sources, &block) warn 'The javadoc method is deprecated and will be removed in a future release.' doc(*sources, &block) end