類別 Reline::GeneralIO
公開類別方法
clear_screen() 按一下以切換來源
# File lib/reline/general_io.rb, line 88 def self.clear_screen end
cursor_pos() 按一下以切換來源
# File lib/reline/general_io.rb, line 63 def self.cursor_pos Reline::CursorPos.new(1, 1) end
deprep(otio) 按一下以切換來源
# File lib/reline/general_io.rb, line 114 def self.deprep(otio) end
encoding() 按一下以切換來源
# File lib/reline/general_io.rb, line 13 def self.encoding if defined?(@@encoding) @@encoding elsif RUBY_PLATFORM =~ /mswin|mingw/ Encoding::UTF_8 else Encoding::default_external end end
erase_after_cursor() 按一下以切換來源
# File lib/reline/general_io.rb, line 82 def self.erase_after_cursor end
finish_pasting() 按一下以切換來源
# File lib/reline/general_io.rb, line 107 def self.finish_pasting @@pasting = false end
get_screen_size() 按一下以切換來源
# File lib/reline/general_io.rb, line 59 def self.get_screen_size [1, 1] end
getc(_timeout_second) 按一下以切換來源
# File lib/reline/general_io.rb, line 41 def self.getc(_timeout_second) unless @@buf.empty? return @@buf.shift end c = nil loop do result = @@input.wait_readable(0.1) next if result.nil? c = @@input.read(1) break end c&.ord end
hide_cursor() 按一下以切換來源
# File lib/reline/general_io.rb, line 67 def self.hide_cursor end
in_pasting?() 按一下以切換來源
# File lib/reline/general_io.rb, line 99 def self.in_pasting? @@pasting end
input=(val) 按一下以切換來源
# File lib/reline/general_io.rb, line 33 def self.input=(val) @@input = val end
move_cursor_column(val) 按一下以切換來源
# File lib/reline/general_io.rb, line 73 def self.move_cursor_column(val) end
move_cursor_down(val) 按一下以切換來源
# File lib/reline/general_io.rb, line 79 def self.move_cursor_down(val) end
move_cursor_up(val) 按一下以切換來源
# File lib/reline/general_io.rb, line 76 def self.move_cursor_up(val) end
prep() 按一下以切換來源
# File lib/reline/general_io.rb, line 111 def self.prep end
reset(encoding: nil) 按一下以切換來源
# File lib/reline/general_io.rb, line 4 def self.reset(encoding: nil) @@pasting = false if encoding @@encoding = encoding elsif defined?(@@encoding) remove_class_variable(:@@encoding) end end
scroll_down(val) 按一下以切換來源
# File lib/reline/general_io.rb, line 85 def self.scroll_down(val) end
set_default_key_bindings(_) 按一下以切換來源
# File lib/reline/general_io.rb, line 27 def self.set_default_key_bindings(_) end
set_screen_size(rows, columns) 按一下以切換來源
# File lib/reline/general_io.rb, line 91 def self.set_screen_size(rows, columns) end
set_winch_handler(&handler) 按一下以切換來源
# File lib/reline/general_io.rb, line 94 def self.set_winch_handler(&handler) end
show_cursor() 按一下以切換來源
# File lib/reline/general_io.rb, line 70 def self.show_cursor end
start_pasting() 按一下以切換來源
# File lib/reline/general_io.rb, line 103 def self.start_pasting @@pasting = true end
ungetc(c) 按一下以切換來源
# File lib/reline/general_io.rb, line 55 def self.ungetc(c) @@buf.unshift(c) end
win?() 按一下以切換來源
# File lib/reline/general_io.rb, line 23 def self.win? false end
with_raw_input() { || ... } 按一下以切換來源
# File lib/reline/general_io.rb, line 37 def self.with_raw_input yield end