Class: TTY2::Reader::CompletionEvent
- Inherits:
-
Object
- Object
- TTY2::Reader::CompletionEvent
- Defined in:
- lib/tty2/reader/completion_event.rb
Instance Attribute Summary collapse
-
#completion ⇒ Object
readonly
The suggested word completion.
-
#completions ⇒ Object
readonly
The completion suggestions.
-
#line ⇒ Object
readonly
The line with word to complete.
-
#word ⇒ Object
readonly
The initial word to complete.
Instance Method Summary collapse
-
#initialize(completer, completion, line) ⇒ CompletionEvent
constructor
Create a CompletionEvent.
Constructor Details
#initialize(completer, completion, line) ⇒ CompletionEvent
Create a CompletionEvent
28 29 30 31 32 33 |
# File 'lib/tty2/reader/completion_event.rb', line 28 def initialize(completer, completion, line) @completion = completion @completions = completer.completions.to_a @line = line @word = completer.word end |
Instance Attribute Details
#completion ⇒ Object (readonly)
The suggested word completion
7 8 9 |
# File 'lib/tty2/reader/completion_event.rb', line 7 def completion @completion end |
#completions ⇒ Object (readonly)
The completion suggestions
10 11 12 |
# File 'lib/tty2/reader/completion_event.rb', line 10 def completions @completions end |
#line ⇒ Object (readonly)
The line with word to complete
13 14 15 |
# File 'lib/tty2/reader/completion_event.rb', line 13 def line @line end |
#word ⇒ Object (readonly)
The initial word to complete
16 17 18 |
# File 'lib/tty2/reader/completion_event.rb', line 16 def word @word end |