pry--pry/lib/pry/input.rb

21 lines
305 B
Ruby
Raw Normal View History

require 'readline'
class Pry
class Input
def read(prompt)
Readline.readline(prompt, true)
end
end
class SourceInput
def initialize(file, line)
@f = File.open(file)
(line - 1).times { @f.readline }
end
def read(prompt)
@f.readline
end
end
end