module Jazzy::DocumentationGenerator

Public Class Methods

documentation_entries() click to toggle source
# File lib/jazzy/documentation_generator.rb, line 28
def self.documentation_entries
  return [] unless
    config.documentation_glob_configured && config.documentation_glob

  config.documentation_glob.select { |e| File.file? e }
end
overview(file_path) click to toggle source
# File lib/jazzy/documentation_generator.rb, line 22
def self.overview(file_path)
  return '' unless file_path&.exist?

  file_path.read
end
source_docs() click to toggle source
# File lib/jazzy/documentation_generator.rb, line 12
def self.source_docs
  documentation_entries.map do |file_path|
    SourceDocument.new.tap do |sd|
      sd.name = File.basename(file_path, '.md')
      sd.overview = overview Pathname(file_path)
      sd.usr = "documentation.#{sd.name}"
    end
  end
end