Sha256: 41ab14e89ee6e20b62645bd96cec21abe0ca9029b635a244036651bea6317e9a
Contents?: true
Size: 774 Bytes
Versions: 15
Compression:
Stored size: 774 Bytes
Contents
require 'pathname' require 'jazzy/jazzy_markdown' require 'jazzy/source_document' module Jazzy module DocumentationGenerator extend Config::Mixin 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 def self.overview(file_path) return '' unless file_path && file_path.exist? file_path.read end def self.documentation_entries return [] unless config.documentation_glob_configured && config.documentation_glob config.documentation_glob.select { |e| File.file? e } end end end
Version data entries
15 entries across 15 versions & 1 rubygems