Class: Aidp::Watch::BaseProcessor
- Inherits:
-
Object
- Object
- Aidp::Watch::BaseProcessor
- Defined in:
- lib/aidp/watch/base_processor.rb
Overview
Base class for Watch Mode processors
Direct Known Subclasses
Instance Attribute Summary collapse
-
#rebase_label ⇒ Object
readonly
Returns the value of attribute rebase_label.
Instance Method Summary collapse
-
#can_process?(work_item) ⇒ Boolean
Checks if this processor can handle the current work item.
-
#initialize(repository_client:, state_store: nil, label_config: {}, verbose: false) ⇒ BaseProcessor
constructor
A new instance of BaseProcessor.
-
#process(work_item) ⇒ Boolean
Process the work item.
Constructor Details
#initialize(repository_client:, state_store: nil, label_config: {}, verbose: false) ⇒ BaseProcessor
Returns a new instance of BaseProcessor.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/aidp/watch/base_processor.rb', line 7 def initialize(repository_client:, state_store: nil, label_config: {}, verbose: false) @repository_client = repository_client @state_store = state_store @verbose = verbose # Only use string or symbol access for label_config @rebase_label = label_config[:rebase_trigger] || label_config["rebase_trigger"] || "aidp-rebase" end |
Instance Attribute Details
#rebase_label ⇒ Object (readonly)
Returns the value of attribute rebase_label.
32 33 34 |
# File 'lib/aidp/watch/base_processor.rb', line 32 def rebase_label @rebase_label end |
Instance Method Details
#can_process?(work_item) ⇒ Boolean
Checks if this processor can handle the current work item
21 22 23 |
# File 'lib/aidp/watch/base_processor.rb', line 21 def can_process?(work_item) raise NotImplementedError, "Subclasses must implement can_process?" end |
#process(work_item) ⇒ Boolean
Process the work item
28 29 30 |
# File 'lib/aidp/watch/base_processor.rb', line 28 def process(work_item) raise NotImplementedError, "Subclasses must implement process" end |