Class: SpecForge::Documentation::Generator
- Inherits:
-
Object
- Object
- SpecForge::Documentation::Generator
- Defined in:
- lib/spec_forge/documentation/generator.rb
Overview
Base class for all documentation generators
Provides the common interface and shared functionality for generators that transform SpecForge documents into various output formats. Subclasses implement format-specific generation logic.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#input ⇒ Document
readonly
The input document containing structured API data.
Class Method Summary collapse
-
.generate(use_cache: false) ⇒ Object
Generates documentation from test data with optional caching.
-
.to_sem_version ⇒ SemVersion
Converts the generator's version to a semantic version object.
-
.validate!(input) ⇒ void
Validates the generated output according to format specifications.
Instance Method Summary collapse
-
#generate ⇒ Object
Generates the document into a specific format.
-
#initialize(input = {}) ⇒ Base
constructor
Initializes a new generators.
Constructor Details
#initialize(input = {}) ⇒ Base
Initializes a new generators
72 73 74 |
# File 'lib/spec_forge/documentation/generator.rb', line 72 def initialize(input = {}) @input = input end |
Instance Attribute Details
#input ⇒ Document (readonly)
The input document containing structured API data
Contains all the endpoint information extracted from tests, organized and ready for transformation into the target format.
63 64 65 |
# File 'lib/spec_forge/documentation/generator.rb', line 63 def input @input end |
Class Method Details
.generate(use_cache: false) ⇒ Object
Generates documentation from test data with optional caching
38 39 40 |
# File 'lib/spec_forge/documentation/generator.rb', line 38 def self.generate(use_cache: false) raise "not implemented" end |
.to_sem_version ⇒ SemVersion
Converts the generator's version to a semantic version object
25 26 27 |
# File 'lib/spec_forge/documentation/generator.rb', line 25 def self.to_sem_version SemVersion.new(const_get("CURRENT_VERSION")) end |
.validate!(input) ⇒ void
This method returns an undefined value.
Validates the generated output according to format specifications
51 52 53 |
# File 'lib/spec_forge/documentation/generator.rb', line 51 def self.validate!(input) raise "not implemented" end |
Instance Method Details
#generate ⇒ Object
Generates the document into a specific format
83 84 85 |
# File 'lib/spec_forge/documentation/generator.rb', line 83 def generate raise "not implemented" end |