Class: JsDocToolkit::Generator
- Inherits:
-
Object
- Object
- JsDocToolkit::Generator
- Defined in:
- lib/jsdoc-toolkit/generator.rb
Constant Summary collapse
- DefaultOptions =
{:recurse => "-r", :all => "-a", :template => %Q[-t=#{JsDocTemplatePath + "jsdoc"}], :verbose => "-v", :unique => "-u"}
Instance Method Summary collapse
Instance Method Details
#build(options) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/jsdoc-toolkit/generator.rb', line 9 def build() src_files, doc_dir = Array([:src_files]), Pathname([:doc_dir].to_s) raise RuntimeError, "java was not found in your PATH." if `which java 2>/dev/null`.strip.empty? raise ArgumentError, ":src_files was not specified or was empty" if src_files.empty? raise ArgumentError, ":doc_dir was not specified or does not exist" unless [:doc_dir] && doc_dir.exist? run_jsdoc(src_files, doc_dir) end |