1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/examples/example_input.rb

10 lines
319 B
Ruby

direc = File.dirname(__FILE__)
require 'rubygems'
require "#{direc}/../lib/pry"
# Create a StringIO that contains the input data
str_input = StringIO.new("puts 'hello world!'\nputs \"I am in \#{self}\"\nexit")
# Start a Pry session on the Fixnum 5 using the input data in str_input
Pry.start(5, :input => str_input)