Sha256: cbd081f0f5d019dca3ff1118be36266a660887e98446feec60611d415d24e4d6

Contents?: true

Size: 860 Bytes

Versions: 24

Compression:

Stored size: 860 Bytes

Contents

direc = File.dirname(__FILE__)

require 'rubygems'
require "#{direc}/../lib/pry"

# Create a StringIO that contains the input data for all the Pry objects
cmds = <<-CMDS
cd 1
status
puts 'hello from 1!!'
cd 2
nesting
puts 'hello from 2!!'
_pry_.parent.input = Readline
back
exit-all
CMDS

# create our StringIO object
str_input = StringIO.new(cmds)

# set global input to str_input, this means that all pry sessions
# adopt this object as their input object.
Pry.input = str_input

# Start the session reading from str_input.
# Note that because `Pry.input` is set to `str_input` all nested pry
# sessions will read from `str_input` too. All pry sessions are there
# for non-interactive, except for `pry(1)` which starts off
# non-interactive but is set to be interactive by pry(2) (using
# _pry_.parent.input = Readline)
0.pry

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
pry-0.6.7 examples/example_input2.rb
pry-0.6.7-i386-mswin32 examples/example_input2.rb
pry-0.6.7-i386-mingw32 examples/example_input2.rb
pry-0.6.7pre4 examples/example_input2.rb
pry-0.6.7pre4-i386-mswin32 examples/example_input2.rb
pry-0.6.7pre4-i386-mingw32 examples/example_input2.rb
pry-0.6.6 examples/example_input2.rb
pry-0.6.5 examples/example_input2.rb
pry-0.6.4 examples/example_input2.rb
pry-0.6.3 examples/example_input2.rb
pry-0.6.2 examples/example_input2.rb
pry-0.6.1 examples/example_input2.rb
pry-0.6.0 examples/example_input2.rb
pry-0.5.9 examples/example_input2.rb
pry-0.5.8 examples/example_input2.rb
pry-0.5.7 examples/example_input2.rb
pry-0.5.6 examples/example_input2.rb
pry-0.5.5 examples/example_input2.rb
pry-0.5.4 examples/example_input2.rb
pry-0.5.2 examples/example_input2.rb