class Jazzy::SourceModule

A cache of info that is common across all page templating, gathered from other parts of the program.

Attributes

author_name[RW]
author_url[RW]
dash_feed_url[RW]
doc_coverage[RW]
doc_structure[RW]
docs[RW]
host[RW]
readme_title[RW]

Public Class Methods

new(docs, doc_structure, doc_coverage, docset_builder) click to toggle source
# File lib/jazzy/source_module.rb, line 24
def initialize(docs, doc_structure, doc_coverage, docset_builder)
  self.docs = docs
  self.doc_structure = doc_structure
  self.doc_coverage = doc_coverage
  title = config.readme_title || config.module_names.first
  self.readme_title = title.empty? ? 'Index' : title
  self.author_name = config.author_name
  self.author_url = config.author_url
  self.host = SourceHost.create(config)
  self.dash_feed_url = docset_builder.dash_feed_url
end

Public Instance Methods

all_declarations() click to toggle source
# File lib/jazzy/source_module.rb, line 36
def all_declarations
  all_declarations = []
  visitor = lambda do |d|
    all_declarations.unshift(*d)
    d.map(&:children).each { |c| visitor[c] }
  end
  visitor[docs]
  all_declarations.reject { |doc| doc.name == 'index' }
end