Revision b0e38c17
Added by Oleksandr Ivanov 7 months ago
lib/almirah/doc_fabric.rb | ||
---|---|---|
require_relative 'doc_types/base_document'
|
||
require_relative 'doc_types/specification'
|
||
require_relative 'doc_types/protocol'
|
||
require_relative 'doc_types/coverage'
|
||
require_relative 'doc_parser'
|
||
require_relative 'dom/document'
|
||
require_relative 'doc_items/heading'
|
||
|
||
class DocFabric
|
||
@@color_index = 0
|
||
... | ... | |
doc
|
||
end
|
||
|
||
def self.create_coverage_matrix(specification)
|
||
doc = Coverage.new specification
|
||
Heading.reset_global_section_number
|
||
doc.headings << Heading.new(doc, doc.title, 0)
|
||
# Build dom
|
||
doc.dom = Document.new(doc.headings)
|
||
doc
|
||
end
|
||
|
||
def self.create_traceability_document(top_document, bottom_document)
|
||
doc = Traceability.new top_document, bottom_document
|
||
Heading.reset_global_section_number
|
||
doc.headings << Heading.new(doc, doc.title, 0)
|
||
# Build dom
|
||
doc.dom = Document.new(doc.headings)
|
||
doc
|
||
end
|
||
|
||
def self.parse_document(doc)
|
||
|
||
file = File.open(doc.path)
|
Also available in: Unified diff
Impl: Unify navigation pane behavior for all the docs (#130)