Class: RSpecDocumentation::Documentation
- Inherits:
-
Object
- Object
- RSpecDocumentation::Documentation
- Includes:
- Paintbrush
- Defined in:
- lib/rspec_documentation/documentation.rb
Overview
Generates documentation from Markdown files, main entry point to documentation generator.
Instance Method Summary collapse
Instance Method Details
#failed? ⇒ Boolean
21 22 23 |
# File 'lib/rspec_documentation/documentation.rb', line 21 def failed? @failed || !page_collection.failures.empty? end |
#generate ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rspec_documentation/documentation.rb', line 8 def generate initialize_if_empty start require_spec_helper ensure_context page_collection.generate flush unless failed? summary.flush rescue RSpecDocumentation::MissingFileError => e warn(paintbrush { red e. }) @failed = true end |
#page_collection ⇒ Object
25 26 27 |
# File 'lib/rspec_documentation/documentation.rb', line 25 def page_collection @page_collection ||= RSpecDocumentation::PageCollection.new(page_paths: page_paths) end |