Attributes
Read
No documentation available
Read
No documentation available
Read
No documentation available
Read & Write
No documentation available
Read & Write
No documentation available
Read & Write
No documentation available
Read & Write
No documentation available
Read & Write
No documentation available
Class Methods
lib/reline/line_editor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/reline/line_editor.rb, line 596
def initialize(name, config, proc_scope)
@name = name
@config = config
@proc_scope = proc_scope
@width = nil
@scroll_top = 0
@trap_key = nil
end
No documentation available
Instance Methods
lib/reline/line_editor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/reline/line_editor.rb, line 620
def call(key)
@proc_scope.set_dialog(self)
@proc_scope.set_key(key)
dialog_render_info = @proc_scope.call
if @trap_key
if @trap_key.any?{ |i| i.is_a?(Array) } # multiple trap
@trap_key.each do |t|
@config.add_oneshot_key_binding(t, @name)
end
elsif @trap_key.is_a?(Array)
@config.add_oneshot_key_binding(@trap_key, @name)
elsif @trap_key.is_a?(Integer) or @trap_key.is_a?(Reline::Key)
@config.add_oneshot_key_binding([@trap_key], @name)
end
end
dialog_render_info
end
No documentation available
lib/reline/line_editor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/reline/line_editor.rb, line 613
def contents=(contents)
@contents = contents
if contents and @width.nil?
@width = contents.map{ |line| Reline::Unicode.calculate_width(line, true) }.max
end
end
No documentation available
lib/reline/line_editor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/reline/line_editor.rb, line 605
def set_cursor_pos(col, row)
@proc_scope.set_cursor_pos(col, row)
end
No documentation available
lib/reline/line_editor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/reline/line_editor.rb, line 609
def width=(v)
@width = v
end
No documentation available