Class: Pry::Shell::IO::Input

Inherits:
Base
  • Object
show all
Defined in:
lib/pry/shell/io/input.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Pry::Shell::IO::Base

Instance Method Details

#completion_procObject



33
34
35
# File 'lib/pry/shell/io/input.rb', line 33

def completion_proc
  object.completion_proc if object.respond_to?(:completion_proc)
end

#completion_proc=(val) ⇒ Object

Assigns the ‘completion_proc` given by the pry instance from the client slide.



29
30
31
# File 'lib/pry/shell/io/input.rb', line 29

def completion_proc=(val)
  object.completion_proc = val if object.respond_to?(:completion_proc=)
end

#drb_threadObject



23
24
25
# File 'lib/pry/shell/io/input.rb', line 23

def drb_thread
  @drb_thread ||= Thread.current
end

#readline(prompt) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/pry/shell/io/input.rb', line 9

def readline(prompt)
  drb_thread

  wait_until_current

  string = object.readline(prompt, true)

  Command.execute(client, string)
rescue
  drb_thread.kill

  nil
end