Class: IRB::InputMethod
Direct Known Subclasses
Constant Summary collapse
- BASIC_WORD_BREAK_CHARACTERS =
" \t\n`><=;|&{("
Instance Attribute Summary collapse
-
#prompt ⇒ Object
The irb prompt associated with this input method.
Instance Method Summary collapse
-
#gets ⇒ Object
Reads the next line from this input method.
-
#inspect ⇒ Object
For debug message.
- #prompting? ⇒ Boolean
-
#readable_after_eof? ⇒ Boolean
Whether this input method is still readable when there is no more data to read.
- #support_history_saving? ⇒ Boolean
- #winsize ⇒ Object
Instance Attribute Details
#prompt ⇒ Object
The irb prompt associated with this input method
17 18 19 |
# File 'lib/irb/input-method.rb', line 17 def prompt @prompt end |
Instance Method Details
#gets ⇒ Object
Reads the next line from this input method.
See IO#gets for more information.
22 23 24 |
# File 'lib/irb/input-method.rb', line 22 def gets fail NotImplementedError end |
#inspect ⇒ Object
For debug message
53 54 55 |
# File 'lib/irb/input-method.rb', line 53 def inspect 'Abstract InputMethod' end |
#prompting? ⇒ Boolean
48 49 50 |
# File 'lib/irb/input-method.rb', line 48 def prompting? false end |
#readable_after_eof? ⇒ Boolean
Whether this input method is still readable when there is no more data to read.
See IO#eof for more information.
40 41 42 |
# File 'lib/irb/input-method.rb', line 40 def readable_after_eof? false end |
#support_history_saving? ⇒ Boolean
44 45 46 |
# File 'lib/irb/input-method.rb', line 44 def support_history_saving? false end |
#winsize ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/irb/input-method.rb', line 27 def winsize if instance_variable_defined?(:@stdout) && @stdout.tty? winsize = @stdout.winsize # If width or height is 0, something is wrong. return winsize unless winsize.include? 0 end [24, 80] end |