Class: Giblish::BasicIndexBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/giblish/buildindex.rb

Overview

Base class with common functionality for all index builders

Direct Known Subclasses

GitRepoIndexBuilder, SimpleIndexBuilder

Instance Method Summary collapse

Constructor Details

#initialize(processed_docs, converter, path_manager, handle_docid = false) ⇒ BasicIndexBuilder

set up the basic index building info



13
14
15
16
17
18
19
20
# File 'lib/giblish/buildindex.rb', line 13

def initialize(processed_docs, converter, path_manager, handle_docid = false)
  @paths = path_manager
  @nof_missing_titles = 0
  @processed_docs = processed_docs
  @converter = converter
  @src_str = ""
  @manage_docid = handle_docid
end

Instance Method Details

#source(dep_graph_exists = false, make_searchable = false) ⇒ Object



22
23
24
25
26
27
28
29
30
31
# File 'lib/giblish/buildindex.rb', line 22

def source(dep_graph_exists = false, make_searchable = false)
  <<~DOC_STR
    #{generate_title_and_header}
    #{generate_date_info}
    #{add_search_box if make_searchable}
    #{generate_tree(dep_graph_exists)}
    #{generate_details}
    #{generate_footer}
  DOC_STR
end