Module: Jazzy::DocumentationGenerator
- Extended by:
- Config::Mixin
- Defined in:
- lib/jazzy/documentation_generator.rb
Class Method Summary collapse
Methods included from Config::Mixin
Class Method Details
.documentation_entries ⇒ Object
25 26 27 28 29 |
# File 'lib/jazzy/documentation_generator.rb', line 25 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) ⇒ Object
20 21 22 23 |
# File 'lib/jazzy/documentation_generator.rb', line 20 def self.overview(file_path) return '' unless file_path && file_path.exist? file_path.read end |
.source_docs ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/jazzy/documentation_generator.rb', line 10 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 |