Class: Ace::Review::Molecules::ContextExtractor
- Inherits:
-
Object
- Object
- Ace::Review::Molecules::ContextExtractor
- Defined in:
- lib/ace/review/molecules/context_extractor.rb
Overview
Extracts context (background information) for reviews Delegates to ContextComposer for context.md pattern and ace-bundle integration
Defined Under Namespace
Classes: ContextExtractorError
Instance Method Summary collapse
-
#extract(context_config, cache_dir = nil) ⇒ String
Extract context from configuration.
-
#initialize ⇒ ContextExtractor
constructor
A new instance of ContextExtractor.
Constructor Details
#initialize ⇒ ContextExtractor
Returns a new instance of ContextExtractor.
11 12 13 |
# File 'lib/ace/review/molecules/context_extractor.rb', line 11 def initialize @preset_manager = nil # Lazy load to avoid circular dependency end |
Instance Method Details
#extract(context_config, cache_dir = nil) ⇒ String
Extract context from configuration
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ace/review/molecules/context_extractor.rb', line 19 def extract(context_config, cache_dir = nil) case context_config when nil, "none", false "" when "project", "auto", true extract_project_context(cache_dir) when String extract_from_string(context_config, cache_dir) when Hash extract_from_hash(context_config, cache_dir) else "" end end |