Class: Yoda::Evaluation::CommentCompletion::BaseProvider Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/yoda/evaluation/comment_completion/base_provider.rb

Overview

This class is abstract.

Direct Known Subclasses

ParamProvider, TagProvider, TypeProvider

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(registry, ast, comments, location) ⇒ BaseProvider

Returns a new instance of BaseProvider.

Parameters:

  • registry (Store::Registry)
  • ast (::Parser::AST::Node)
  • comments (Array<::Parser::Source::Comment>)
  • location (Location)


22
23
24
25
26
27
# File 'lib/yoda/evaluation/comment_completion/base_provider.rb', line 22

def initialize(registry, ast, comments, location)
  @registry = registry
  @ast = ast
  @comments = comments
  @location = location
end

Instance Attribute Details

#astObject (readonly)

Returns the value of attribute ast.



10
11
12
# File 'lib/yoda/evaluation/comment_completion/base_provider.rb', line 10

def ast
  @ast
end

#commentsObject (readonly)

Returns the value of attribute comments.



13
14
15
# File 'lib/yoda/evaluation/comment_completion/base_provider.rb', line 13

def comments
  @comments
end

#locationObject (readonly)

Returns the value of attribute location.



16
17
18
# File 'lib/yoda/evaluation/comment_completion/base_provider.rb', line 16

def location
  @location
end

#registryObject (readonly)

Returns the value of attribute registry.



7
8
9
# File 'lib/yoda/evaluation/comment_completion/base_provider.rb', line 7

def registry
  @registry
end

Instance Method Details

#available?true, false

This method is abstract.

Returns:

  • (true, false)


31
32
33
# File 'lib/yoda/evaluation/comment_completion/base_provider.rb', line 31

def available?
  fail NotImplementedError
end

#candidatesArray<Model::CompletionItem>

This method is abstract.

Returns:



37
38
39
# File 'lib/yoda/evaluation/comment_completion/base_provider.rb', line 37

def candidates
  fail NotImplementedError
end