Class: GemOf::DocsTasks

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/gem_of/rake_tasks.rb

Overview

various yarddoc docs tasks

arch, clean, measure, undoc, verify, yard

Constant Summary collapse

YARD_DIR =

location of the yarddocs produced

"doc".freeze
DOCS_DIR =

location of the human user docs (markdown, etc)

"docs".freeze

Instance Method Summary collapse

Constructor Details

#initializeDocsTasks

instance yardoc tasks in namespace :docs

Examples:

DocsTasks.new



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/gem_of/rake_tasks.rb', line 82

def initialize
  namespace :docs do
    # docs:yard task
    YARD::Rake::YardocTask.new

    desc "Clean/remove the generated YARD Documentation cache"
    task :clean do
      sh "rm -rf #{YARD_DIR}"
    end

    desc "Tell me about YARD undocumented objects"
    YARD::Rake::YardocTask.new(:undoc) do |t|
      t.stats_options = ["--list-undoc"]
    end

    desc "Generate static project architecture graph. (Calls docs:yard)"
    # this calls `yard graph` so we can't use the yardoc tasks like above
    #   We could create a YARD:CLI:Graph object.
    #   But we have to send the output to the graphviz processor, etc.
    task arch: [:yard] do
      arch_diagram
    end
  end
end