Module: LlmDocsBuilder::Transformers::BaseTransformer
- Included in:
- ContentCleanupTransformer, EnhancementTransformer, HeadingTransformer, LinkTransformer, WhitespaceTransformer
- Defined in:
- lib/llm_docs_builder/transformers/base_transformer.rb
Overview
Base module for all transformers
Provides a common interface for content transformation operations. Each transformer should implement the ‘transform` method.
Instance Method Summary collapse
-
#should_transform?(options) ⇒ Boolean
Check if transformation should be applied.
-
#transform(content, options = {}) ⇒ String
abstract
Transform content.
Instance Method Details
#should_transform?(options) ⇒ Boolean
Note:
Options vary by implementation - see specific transformer classes for supported keys
Check if transformation should be applied
37 38 39 |
# File 'lib/llm_docs_builder/transformers/base_transformer.rb', line 37 def should_transform?() true end |
#transform(content, options = {}) ⇒ String
This method is abstract.
Subclasses must implement this method and document specific options
Note:
Options vary by implementation - see specific transformer classes for supported keys
Transform content
27 28 29 |
# File 'lib/llm_docs_builder/transformers/base_transformer.rb', line 27 def transform(content, = {}) raise NotImplementedError, "#{self.class} must implement #transform" end |