Class: IRB::TypeCompletor
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
BaseCompletor
|
|
Instance Chain:
self,
BaseCompletor
|
|
Inherits: |
IRB::BaseCompletor
|
Defined in: | lib/irb/completion.rb |
Constant Summary
BaseCompletor
- Inherited
Class Method Summary
- .new(context) ⇒ TypeCompletor constructor
Instance Method Summary
- #completion_candidates(preposing, target, _postposing, bind:)
- #doc_namespace(preposing, matched, _postposing, bind:)
- #inspect
BaseCompletor
- Inherited
Constructor Details
.new(context) ⇒ TypeCompletor
# File 'lib/irb/completion.rb', line 105
def initialize(context) @context = context end
Instance Method Details
#completion_candidates(preposing, target, _postposing, bind:)
[ GitHub ]# File 'lib/irb/completion.rb', line 113
def completion_candidates(preposing, target, _postposing, bind:) commands = command_completions(preposing, target) result = ReplTypeCompletor.analyze(preposing + target, binding: bind, filename: @context.irb_path) return commands unless result commands | result.completion_candidates.map { target + _1 } end
#doc_namespace(preposing, matched, _postposing, bind:)
[ GitHub ]# File 'lib/irb/completion.rb', line 121
def doc_namespace(preposing, matched, _postposing, bind:) result = ReplTypeCompletor.analyze(preposing + matched, binding: bind, filename: @context.irb_path) result&.doc_namespace('') end
#inspect
[ GitHub ]# File 'lib/irb/completion.rb', line 109
def inspect ReplTypeCompletor.info end