Class: Yoda::Services::CommentCompletion::TypeProvider
- Inherits:
-
BaseProvider
- Object
- BaseProvider
- Yoda::Services::CommentCompletion::TypeProvider
- Defined in:
- lib/yoda/services/comment_completion/type_provider.rb
Instance Attribute Summary
Attributes inherited from BaseProvider
#ast, #comments, #environment, #location
Instance Method Summary collapse
Methods inherited from BaseProvider
Constructor Details
This class inherits a constructor from Yoda::Services::CommentCompletion::BaseProvider
Instance Method Details
#available? ⇒ true, false
6 7 8 |
# File 'lib/yoda/services/comment_completion/type_provider.rb', line 6 def available? [:type, :type_tag_type].include?(current_comment_token_query.current_state) end |
#candidates ⇒ Array<Model::CompletionItem>
11 12 13 |
# File 'lib/yoda/services/comment_completion/type_provider.rb', line 11 def candidates description_candidates.map { |description| Model::CompletionItem.new(description: description, range: substitution_range) } end |