类 Reline::LineEditor::DialogProcScope

公共类方法

new(line_editor, config, proc_to_exec, context) 点击切换源代码
# File lib/reline/line_editor.rb, line 516
def initialize(line_editor, config, proc_to_exec, context)
  @line_editor = line_editor
  @config = config
  @proc_to_exec = proc_to_exec
  @context = context
  @cursor_pos = Reline::CursorPos.new
end

公共实例方法

call() 点击切换源代码
# File lib/reline/line_editor.rb, line 587
def call
  instance_exec(&@proc_to_exec)
end
call_completion_proc_with_checking_args(pre, target, post) 点击切换源代码
# File lib/reline/line_editor.rb, line 532
def call_completion_proc_with_checking_args(pre, target, post)
  @line_editor.call_completion_proc_with_checking_args(pre, target, post)
end
completion_journey_data() 点击切换源代码
# File lib/reline/line_editor.rb, line 579
def completion_journey_data
  @line_editor.instance_variable_get(:@completion_journey_data)
end
config() 点击切换源代码
# File lib/reline/line_editor.rb, line 583
def config
  @config
end
context() 点击切换源代码
# File lib/reline/line_editor.rb, line 524
def context
  @context
end
cursor_pos() 点击切换源代码
# File lib/reline/line_editor.rb, line 557
def cursor_pos
  @cursor_pos
end
dialog() 点击切换源代码
# File lib/reline/line_editor.rb, line 540
def dialog
  @dialog
end
just_cursor_moving() 点击切换源代码
# File lib/reline/line_editor.rb, line 561
def just_cursor_moving
  @line_editor.instance_variable_get(:@just_cursor_moving)
end
key() 点击切换源代码
# File lib/reline/line_editor.rb, line 553
def key
  @key
end
preferred_dialog_height() 点击切换源代码
# File lib/reline/line_editor.rb, line 573
def preferred_dialog_height
  rest_height = @line_editor.instance_variable_get(:@rest_height)
  scroll_partial_screen = @line_editor.instance_variable_get(:@scroll_partial_screen) || 0
  [cursor_pos.y - scroll_partial_screen, rest_height, (screen_height + 6) / 5].max
end
retrieve_completion_block(set_completion_quote_character = false) 点击切换源代码
# File lib/reline/line_editor.rb, line 528
def retrieve_completion_block(set_completion_quote_character = false)
  @line_editor.retrieve_completion_block(set_completion_quote_character)
end
screen_height() 点击切换源代码
# File lib/reline/line_editor.rb, line 569
def screen_height
  @line_editor.instance_variable_get(:@screen_size).first
end
screen_width() 点击切换源代码
# File lib/reline/line_editor.rb, line 565
def screen_width
  @line_editor.instance_variable_get(:@screen_size).last
end
set_cursor_pos(col, row) 点击切换源代码
# File lib/reline/line_editor.rb, line 544
def set_cursor_pos(col, row)
  @cursor_pos.x = col
  @cursor_pos.y = row
end
set_dialog(dialog) 点击切换源代码
# File lib/reline/line_editor.rb, line 536
def set_dialog(dialog)
  @dialog = dialog
end
set_key(key) 点击切换源代码
# File lib/reline/line_editor.rb, line 549
def set_key(key)
  @key = key
end