Class: Reline::LineEditor::DialogProcScope
- Inherits:
-
Object
- Object
- Reline::LineEditor::DialogProcScope
- Defined in:
- lib/reline/line_editor.rb
Instance Method Summary collapse
- #call ⇒ Object
- #call_completion_proc_with_checking_args(pre, target, post) ⇒ Object
- #completion_journey_data ⇒ Object
- #config ⇒ Object
- #context ⇒ Object
- #cursor_pos ⇒ Object
- #dialog ⇒ Object
-
#initialize(line_editor, config, proc_to_exec, context) ⇒ DialogProcScope
constructor
A new instance of DialogProcScope.
- #just_cursor_moving ⇒ Object
- #key ⇒ Object
- #retrieve_completion_block(set_completion_quote_character = false) ⇒ Object
- #screen_width ⇒ Object
- #set_cursor_pos(col, row) ⇒ Object
- #set_dialog(dialog) ⇒ Object
- #set_key(key) ⇒ Object
Constructor Details
#initialize(line_editor, config, proc_to_exec, context) ⇒ DialogProcScope
Returns a new instance of DialogProcScope.
512 513 514 515 516 517 518 |
# File 'lib/reline/line_editor.rb', line 512 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 ⇒ Object
573 574 575 |
# File 'lib/reline/line_editor.rb', line 573 def call instance_exec(&@proc_to_exec) end |
#call_completion_proc_with_checking_args(pre, target, post) ⇒ Object
528 529 530 |
# File 'lib/reline/line_editor.rb', line 528 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 ⇒ Object
565 566 567 |
# File 'lib/reline/line_editor.rb', line 565 def completion_journey_data @line_editor.instance_variable_get(:@completion_journey_data) end |
#config ⇒ Object
569 570 571 |
# File 'lib/reline/line_editor.rb', line 569 def config @config end |
#context ⇒ Object
520 521 522 |
# File 'lib/reline/line_editor.rb', line 520 def context @context end |
#cursor_pos ⇒ Object
553 554 555 |
# File 'lib/reline/line_editor.rb', line 553 def cursor_pos @cursor_pos end |
#dialog ⇒ Object
536 537 538 |
# File 'lib/reline/line_editor.rb', line 536 def dialog @dialog end |
#just_cursor_moving ⇒ Object
557 558 559 |
# File 'lib/reline/line_editor.rb', line 557 def just_cursor_moving @line_editor.instance_variable_get(:@just_cursor_moving) end |
#key ⇒ Object
549 550 551 |
# File 'lib/reline/line_editor.rb', line 549 def key @key end |
#retrieve_completion_block(set_completion_quote_character = false) ⇒ Object
524 525 526 |
# File 'lib/reline/line_editor.rb', line 524 def retrieve_completion_block(set_completion_quote_character = false) @line_editor.retrieve_completion_block(set_completion_quote_character) end |
#screen_width ⇒ Object
561 562 563 |
# File 'lib/reline/line_editor.rb', line 561 def screen_width @line_editor.instance_variable_get(:@screen_size).last end |
#set_cursor_pos(col, row) ⇒ Object
540 541 542 543 |
# File 'lib/reline/line_editor.rb', line 540 def set_cursor_pos(col, row) @cursor_pos.x = col @cursor_pos.y = row end |
#set_dialog(dialog) ⇒ Object
532 533 534 |
# File 'lib/reline/line_editor.rb', line 532 def set_dialog(dialog) @dialog = dialog end |
#set_key(key) ⇒ Object
545 546 547 |
# File 'lib/reline/line_editor.rb', line 545 def set_key(key) @key = key end |