Class: PryRemote::InputProxy
Overview
A class to represent an input object created from DRb. This is used because Pry checks for arity to know if a prompt should be passed to the object.
Instance Attribute Summary collapse
-
#input ⇒ #readline
Object to proxy.
Instance Method Summary collapse
- #completion_proc=(val) ⇒ Object
-
#readline(prompt) ⇒ Object
Reads a line from the input.
- #readline_arity ⇒ Object
Instance Attribute Details
#input ⇒ #readline
Object to proxy
14 15 16 |
# File 'lib/pry-remote.rb', line 14 def input @input end |
Instance Method Details
#completion_proc=(val) ⇒ Object
23 24 25 |
# File 'lib/pry-remote.rb', line 23 def completion_proc=(val) input.completion_proc = val end |
#readline(prompt) ⇒ Object
Reads a line from the input
16 17 18 19 20 21 |
# File 'lib/pry-remote.rb', line 16 def readline(prompt) case readline_arity when 1 then input.readline(prompt) else input.readline end end |
#readline_arity ⇒ Object
27 28 29 30 31 |
# File 'lib/pry-remote.rb', line 27 def readline_arity input.method_missing(:method, :readline).arity rescue NameError 0 end |