Class: Prmd::RakeTasks::Doc

Inherits:
Base
  • Object
show all
Defined in:
lib/prmd/rake_tasks/doc.rb

Overview

Documentation rake task

Examples:

Prmd::RakeTasks::Doc.new do |t|
  t.files = { 'schema/api.json' => 'schema/api.md' }
end

Instance Attribute Summary collapse

Attributes inherited from Base

#name, #options

Instance Method Summary collapse

Constructor Details

#initialize(name = :doc, &block) ⇒ Doc

Creates a new task with name name.

Parameters:

  • name (String, Symbol) (defaults to: :doc)

    the name of the rake task



25
26
27
28
29
# File 'lib/prmd/rake_tasks/doc.rb', line 25

def initialize(name = :doc, &block)
  @files = []
  super name, &block
  @options[:template] ||= Prmd::Template.template_dirname
end

Instance Attribute Details

#filesArray<String>, Hash<String, String>

Schema files that should be verified

Returns:

  • (Array<String>, Hash<String, String>)

    list of files



20
21
22
# File 'lib/prmd/rake_tasks/doc.rb', line 20

def files
  @files
end