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
36 37 38 |
# File 'lib/llm_docs_builder/transformers/base_transformer.rb', line 36 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
26 27 28 |
# File 'lib/llm_docs_builder/transformers/base_transformer.rb', line 26 def transform(content, = {}) raise NotImplementedError, "#{self.class} must implement #transform" end |