Sha256: 9c9bfb365aee5e231a41bf823e7c790491366913f8e48448eb72292bba981892
Contents?: true
Size: 701 Bytes
Versions: 4
Compression:
Stored size: 701 Bytes
Contents
require 'rake' require 'jsdoc-toolkit' require 'jsdoc-toolkit/generator' require 'pathname' module JsDocToolkit class DocTask def initialize(task_name) yield(self) task(task_name) { build } end def jsdoc_dir=(path) @jsdoc_dir = Pathname(caller.first.sub(/:\d+$/, "")).expand_path.parent + path end def jsdoc_files=(path) @jsdoc_files = Pathname(caller.first.sub(/:\d+$/, "")).expand_path.parent + path end private def build generator = JsDocToolkit::Generator.new generator.build(:src_dir => @jsdoc_files.expand_path.to_s, :doc_dir => @jsdoc_dir.expand_path.to_s) end end # DocTask end # JsDocToolkit
Version data entries
4 entries across 4 versions & 1 rubygems