class PrayRemote::IOUndumpedProxy
Class used to wrap inputs so that they can be sent through DRab.
This is to ensure the input is used locally and not reconstructed on the server by DRab.
Public Class Methods
new(obj)
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 146 def initialize(obj) @obj = obj @arity = obj.method(:readline).arity end
Public Instance Methods
<<(data)
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 192 def <<(data) @obj << data self end
completion_proc()
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 157 def completion_proc @obj.completion_proc if @obj.respond_to? :completion_proc end
completion_proc=(val)
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 151 def completion_proc=(val) if @obj.respond_to? :completion_proc= @obj.completion_proc = proc { |*args, &block| val.call(*args, &block) } end end
print(*objs)
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 180 def print(*objs) @obj.print(*objs) end
printf(*args)
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 184 def printf(*args) @obj.printf(*args) end
puts(*lines)
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 176 def puts(*lines) @obj.puts(*lines) end
readline(prompt)
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 165 def readline(prompt) if Readline == @obj @obj.readline(prompt, true) elsif @arity == 1 @obj.readline(prompt) else $stdout.print prompt @obj.readline end end
readline_arity()
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 161 def readline_arity @arity end
tty?()
click to toggle source
Some versions of Pry expect $stdout or its output objects to respond to this message.
# File lib/pray-remote/pray-remote.rb, line 199 def tty? false end
write(data)
click to toggle source
# File lib/pray-remote/pray-remote.rb, line 188 def write(data) @obj.write data end