Class
Constants
No documentation available
Attributes
Write
No documentation available
Class Methods
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 8
def initialize(encoding: nil)
@input = STDIN
@output = STDOUT
@buf = []
@pasting = false
@encoding = encoding
@screen_size = [24, 80]
end
No documentation available
Instance Methods
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 49
def buffered_output
yield
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 101
def clear_screen
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 76
def cursor_pos
Reline::CursorPos.new(0, 0)
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 118
def deprep(otio)
end
No documentation available
#
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 17
def dumb?
true
end
No documentation available
#
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 21
def encoding
if @encoding
@encoding
elsif RUBY_PLATFORM =~ /mswin|mingw/
Encoding::UTF_8
else
@input.external_encoding || Encoding.default_external
end
rescue IOError
# STDIN.external_encoding raises IOError in Ruby <= 3.0 when STDIN is closed
Encoding.default_external
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 95
def erase_after_cursor
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 72
def get_screen_size
@screen_size
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 53
def getc(_timeout_second)
unless @buf.empty?
return @buf.shift
end
c = nil
loop do
Reline.core.line_editor.handle_signal
result = @input.wait_readable(0.1)
next if result.nil?
c = @input.read(1)
break
end
c&.ord
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 80
def hide_cursor
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 111
def in_pasting?
@pasting
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 37
def input=(val)
@input = val
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 86
def move_cursor_column(val)
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 92
def move_cursor_down(val)
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 89
def move_cursor_up(val)
end
No documentation available
#
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 115
def prep
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 98
def scroll_down(val)
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 34
def set_default_key_bindings(_)
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 104
def set_screen_size(rows, columns)
@screen_size = [rows, columns]
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 108
def set_winch_handler(&handler)
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 83
def show_cursor
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 68
def ungetc(c)
@buf.unshift(c)
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 41
def with_raw_input
yield
end
No documentation available
lib/reline/io/dumb.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/reline/io/dumb.rb, line 45
def write(string)
@output.write(string)
end
No documentation available