Class: Reline::LineEditor::DialogProcScope
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Inherits: | Object |
Defined in: | lib/reline/line_editor.rb |
Class Method Summary
Instance Method Summary
- #call
- #call_completion_proc_with_checking_args(pre, target, post)
- #completion_journey_data
- #config
- #context
- #cursor_pos
- #dialog
- #just_cursor_moving
- #key
- #preferred_dialog_height
- #retrieve_completion_block(_unused = false)
- #screen_height
- #screen_width
- #set_cursor_pos(col, row)
- #set_dialog(dialog)
- #set_key(key)
Constructor Details
.new(line_editor, config, proc_to_exec, context) ⇒ DialogProcScope
# File 'lib/reline/line_editor.rb', line 571
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
Instance Method Details
#call
[ GitHub ]# File 'lib/reline/line_editor.rb', line 642
def call instance_exec(&@proc_to_exec) end
#call_completion_proc_with_checking_args(pre, target, post)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 588
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
[ GitHub ]# File 'lib/reline/line_editor.rb', line 634
def completion_journey_data @line_editor.dialog_proc_scope_completion_journey_data end
#config
[ GitHub ]# File 'lib/reline/line_editor.rb', line 638
def config @config end
#context
[ GitHub ]# File 'lib/reline/line_editor.rb', line 579
def context @context end
#cursor_pos
[ GitHub ]# File 'lib/reline/line_editor.rb', line 613
def cursor_pos @cursor_pos end
#dialog
[ GitHub ]# File 'lib/reline/line_editor.rb', line 596
def dialog @dialog end
#just_cursor_moving
[ GitHub ]# File 'lib/reline/line_editor.rb', line 617
def just_cursor_moving @line_editor.instance_variable_get(:@just_cursor_moving) end
#key
[ GitHub ]# File 'lib/reline/line_editor.rb', line 609
def key @key end
#preferred_dialog_height
[ GitHub ]# File 'lib/reline/line_editor.rb', line 629
def preferred_dialog_height _wrapped_cursor_x, wrapped_cursor_y = @line_editor.wrapped_cursor_position [@line_editor.upper_space_height(wrapped_cursor_y), @line_editor.rest_height(wrapped_cursor_y), (screen_height + 6) / 5].max end
#retrieve_completion_block(_unused = false)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 583
def retrieve_completion_block(_unused = false) preposing, target, postposing, _quote = @line_editor.retrieve_completion_block [preposing, target, postposing] end
#screen_height
[ GitHub ]# File 'lib/reline/line_editor.rb', line 625
def screen_height @line_editor.screen_height end
#screen_width
[ GitHub ]# File 'lib/reline/line_editor.rb', line 621
def screen_width @line_editor.screen_width end
#set_cursor_pos(col, row)
[ GitHub ]# File 'lib/reline/line_editor.rb', line 600
def set_cursor_pos(col, row) @cursor_pos.x = col @cursor_pos.y = row end