Class: Ukiryu::Extractors::BaseExtractor Abstract
- Inherits:
-
Object
- Object
- Ukiryu::Extractors::BaseExtractor
- Defined in:
- lib/ukiryu/extractors/base_extractor.rb
Overview
This class is abstract.
Subclasses must implement the ‘extract` method
Base class for definition extraction strategies
Each extraction strategy implements a different approach to extracting tool definitions from CLI tools.
Direct Known Subclasses
Instance Method Summary collapse
-
#available? ⇒ Boolean
Check if this extractor can extract from the tool.
-
#extract ⇒ String?
Extract definition from the tool.
-
#initialize(tool_name, options = {}) ⇒ BaseExtractor
constructor
Initialize the extractor.
Constructor Details
#initialize(tool_name, options = {}) ⇒ BaseExtractor
Initialize the extractor
16 17 18 19 |
# File 'lib/ukiryu/extractors/base_extractor.rb', line 16 def initialize(tool_name, = {}) @tool_name = tool_name @options = end |
Instance Method Details
#available? ⇒ Boolean
Check if this extractor can extract from the tool
34 35 36 |
# File 'lib/ukiryu/extractors/base_extractor.rb', line 34 def available? raise NotImplementedError, "#{self.class} must implement #available?" end |
#extract ⇒ String?
Extract definition from the tool
Subclasses must implement this method
27 28 29 |
# File 'lib/ukiryu/extractors/base_extractor.rb', line 27 def extract raise NotImplementedError, "#{self.class} must implement #extract" end |