123456789_123456789_123456789_123456789_123456789_

Class: Reline::GeneralIO

Relationships & Source Files
Inherits: Object
Defined in: lib/reline/general_io.rb

Constant Summary

Class Attribute Summary

Class Method Summary

Class Attribute Details

.in_pasting?Boolean (readonly)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 101

def self.in_pasting?
  @@pasting
end

.input=(val) (writeonly)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 35

def self.input=(val)
  @@input = val
end

.win?Boolean (readonly)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 25

def self.win?
  false
end

Class Method Details

.clear_screen

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 90

def self.clear_screen
end

.cursor_pos

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 65

def self.cursor_pos
  Reline::CursorPos.new(1, 1)
end

.deprep(otio)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 108

def self.deprep(otio)
end

.encoding

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 15

def self.encoding
  if defined?(@@encoding)
    @@encoding
  elsif RUBY_PLATFORM =~ /mswin|mingw/
    Encoding::UTF_8
  else
    Encoding::default_external
  end
end

.erase_after_cursor

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 84

def self.erase_after_cursor
end

.get_screen_size

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 61

def self.get_screen_size
  [24, 80]
end

.getc(_timeout_second)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 43

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

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 69

def self.hide_cursor
end

.move_cursor_column(val)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 75

def self.move_cursor_column(val)
end

.move_cursor_down(val)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 81

def self.move_cursor_down(val)
end

.move_cursor_up(val)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 78

def self.move_cursor_up(val)
end

.prep

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 105

def self.prep
end

.reset(encoding: nil)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 6

def self.reset(encoding: nil)
  @@pasting = false
  if encoding
    @@encoding = encoding
  elsif defined?(@@encoding)
    remove_class_variable(:@@encoding)
  end
end

.scroll_down(val)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 87

def self.scroll_down(val)
end

.set_default_key_bindings(_)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 29

def self.set_default_key_bindings(_)
end

.set_screen_size(rows, columns)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 93

def self.set_screen_size(rows, columns)
end

.set_winch_handler(&handler)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 96

def self.set_winch_handler(&handler)
end

.show_cursor

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 72

def self.show_cursor
end

.ungetc(c)

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 57

def self.ungetc(c)
  @@buf.unshift(c)
end

.with_raw_input

[ GitHub ]

  
# File 'lib/reline/general_io.rb', line 39

def self.with_raw_input
  yield
end