Module: Buildr::Doc
- Includes:
- Extension
- Included in:
- Project
- Defined in:
- lib/buildr/core/doc.rb,
lib/buildr/java/doc.rb,
lib/buildr/scala/doc.rb,
lib/buildr/groovy/doc.rb
Overview
:nodoc:
Defined Under Namespace
Modules: GroovydocDefaults, JavadocDefaults, ScaladocDefaults Classes: Base, DocTask, Groovydoc, Javadoc, Scaladoc, VScaladoc
Class Method Summary collapse
Instance Method Summary collapse
-
#doc(*sources, &block) ⇒ Object
:call-seq: doc(*sources) => JavadocTask.
- #javadoc(*sources, &block) ⇒ Object
Methods included from Extension
Class Method Details
.engines ⇒ Object
33 34 35 |
# File 'lib/buildr/core/doc.rb', line 33 def engines @engines ||= [] end |
.select_by_lang(lang) ⇒ Object Also known as: select
21 22 23 24 |
# 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 |
.select_by_name(name) ⇒ Object
28 29 30 31 |
# 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 |
Instance Method Details
#doc(*sources, &block) ⇒ Object
:call-seq:
doc(*sources) => JavadocTask
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')
268 269 270 |
# File 'lib/buildr/core/doc.rb', line 268 def doc(*sources, &block) task('doc').from(*sources).enhance &block end |