Class: Yoda::Services::CodeCompletion::BaseProvider Abstract
- Inherits:
-
Object
- Object
- Yoda::Services::CodeCompletion::BaseProvider
- Defined in:
- lib/yoda/services/code_completion/base_provider.rb
Overview
This class is abstract.
Base class of completion candidates providers for code completion. This class bridges analysis features such as syntastic analysis #source_analyzer and symbolic execiton #evaluator.
Direct Known Subclasses
ConstProvider, KeywordProvider, LocalVariableProvider, MethodProvider
Instance Attribute Summary collapse
- #ast ⇒ AST::Vnode readonly
- #environment ⇒ Model::Environment readonly
- #evaluator ⇒ Evaluator readonly
- #location ⇒ Parsing::Location readonly
Instance Method Summary collapse
- #candidates ⇒ Array<Model::CompletionItem> abstract
-
#initialize(environment, ast, location, evaluator) ⇒ BaseProvider
constructor
A new instance of BaseProvider.
- #providable? ⇒ true, false abstract
Constructor Details
#initialize(environment, ast, location, evaluator) ⇒ BaseProvider
Returns a new instance of BaseProvider.
24 25 26 27 28 29 |
# File 'lib/yoda/services/code_completion/base_provider.rb', line 24 def initialize(environment, ast, location, evaluator) @environment = environment @ast = ast @location = location @evaluator = evaluator end |
Instance Attribute Details
#ast ⇒ AST::Vnode (readonly)
12 13 14 |
# File 'lib/yoda/services/code_completion/base_provider.rb', line 12 def ast @ast end |
#environment ⇒ Model::Environment (readonly)
9 10 11 |
# File 'lib/yoda/services/code_completion/base_provider.rb', line 9 def environment @environment end |
#evaluator ⇒ Evaluator (readonly)
18 19 20 |
# File 'lib/yoda/services/code_completion/base_provider.rb', line 18 def evaluator @evaluator end |
#location ⇒ Parsing::Location (readonly)
15 16 17 |
# File 'lib/yoda/services/code_completion/base_provider.rb', line 15 def location @location end |
Instance Method Details
#candidates ⇒ Array<Model::CompletionItem>
This method is abstract.
39 40 41 |
# File 'lib/yoda/services/code_completion/base_provider.rb', line 39 def candidates fail NotImplementedError end |
#providable? ⇒ true, false
This method is abstract.
33 34 35 |
# File 'lib/yoda/services/code_completion/base_provider.rb', line 33 def providable? fail NotImplementedError end |