Sha256: 3ffae6de087f75bbd6ff337774e8b37f987b222417d7e5b4608458a0891200d4

Contents?: true

Size: 575 Bytes

Versions: 1

Compression:

Stored size: 575 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(path)
    end
    
    def jsdoc_files=(path)
      @jsdoc_files = Pathname(path)
    end  

  private

    def build
      generator = JsDocToolkit::Generator.new
      generator.build(:src_dir => @jsdoc_files.to_s, :doc_dir => @jsdoc_dir.to_s)
    end
    
  end # DocTask
end   # JsDocToolkit

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jsdoc-toolkit-0.1.4 lib/jsdoc-toolkit/doc_task.rb